OFFSET
1,3
COMMENTS
Permutation of A003714 (Fibbinary numbers).
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..1025
PROG
(Python)
from math import isqrt
from sympy import mobius, primepi, factorint
def A277010(n):
def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
return sum(1<<primepi(p)+i for i, p in enumerate(factorint(bisection(f), multiple=True), -1)) # Chai Wah Wu, Aug 31 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 07 2016
STATUS
approved