%I #13 Aug 31 2024 14:56:29
%S 0,1,2,4,5,8,9,16,32,17,10,64,128,18,33,256,65,512,21,1024,34,129,20,
%T 2048,257,66,4096,37,8192,513,16384,130,32768,36,258,1025,65536,
%U 131072,2049,68,69,262144,514,41,524288,1048576,4097,40,133,2097152,8193,4194304,132,16385,1026,8388608,72,2050,32769,260,16777216,33554432,261,67108864,42
%N a(n) = A156552(A005117(n)); permutation of Fibbinary numbers.
%C Permutation of A003714 (Fibbinary numbers).
%H Antti Karttunen, <a href="/A277010/b277010.txt">Table of n, a(n) for n = 1..1025</a>
%F a(n) = A156552(A005117(n)).
%F Other identities. For all n >= 1:
%F a(A071403(n)) = A000079(n-1).
%o (Scheme) (define (A277010 n) (A156552 (A005117 n)))
%o (Python)
%o from math import isqrt
%o from sympy import mobius, primepi, factorint
%o def A277010(n):
%o def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
%o def bisection(f,kmin=0,kmax=1):
%o while f(kmax) > kmax: kmax <<= 1
%o while kmax-kmin > 1:
%o kmid = kmax+kmin>>1
%o if f(kmid) <= kmid:
%o kmax = kmid
%o else:
%o kmin = kmid
%o return kmax
%o return sum(1<<primepi(p)+i for i, p in enumerate(factorint(bisection(f), multiple=True),-1)) # _Chai Wah Wu_, Aug 31 2024
%Y Cf. A000040, A003714, A005117, A071403, A156552.
%Y Cf. also A277006, A277020, A277195.
%K nonn
%O 1,3
%A _Antti Karttunen_, Oct 07 2016