Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fixed points of A368207.
1

%I #14 Dec 23 2023 01:40:48

%S 0,1,2,8,9,32,128,238,512,1012,2048,8192,15070,21658,32768,131072,

%T 383548,391612,524288

%N Fixed points of A368207.

%C Numbers k such that A368207(k)=k.

%C Conjecture: 2^(2k+1) for k>=0 (A004171) are terms.

%o (Python)

%o from itertools import count, islice

%o from sympy import divisors

%o def A368341_gen(startvalue=0): # generator of terms >= startvalue

%o for n in count(max(startvalue,0)):

%o c = 0

%o for d2 in divisors(n):

%o if d2**2 > n:

%o break

%o c += (d2<<2)-2 if d2**2<n else (d2<<1)-1

%o if c>n:

%o break

%o if c<=n:

%o for wx in range(1,(n>>1)+1):

%o for d1 in divisors(wx):

%o if d1**2 > wx:

%o break

%o for d2 in divisors(m:=n-wx):

%o if d2**2 > m:

%o break

%o if wx < d1*d2:

%o k = 1

%o if d1**2 != wx:

%o k <<=1

%o if d2**2 != m:

%o k <<=1

%o c+=k

%o if c>n:

%o break

%o if c==n:

%o yield n

%o A368341_list = list(islice(A368341_gen(),10))

%Y Cf. A004171, A368207.

%K nonn,more

%O 1,3

%A _Chai Wah Wu_, Dec 21 2023

%E a(17)-a(19) from _Chai Wah Wu_, Dec 22 2023