OFFSET
1,2
COMMENTS
Similar to A004729, which allows each Fermat prime to occur 0 or 1 times. Applying Euler's phi function to these numbers produces numbers in A143513.
If the well-known conjecture that there are only five prime Fermat numbers F_k = 2^(2^k) + 1, k=0,1,2,3,4, is true, then we have exactly Sum_{n>=1} 1/a(n) = Product_{k=0..4} F_k/(F_k-1) = 4294967295/2147483648 = 1.9999999995343387126922607421875. - Vladimir Shevelev and T. D. Noe, Dec 01 2010
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000 (corrected by Amiram Eldar)
MATHEMATICA
nn=60; logs=Log2[{3, 5, 17, 257, 65537}]; lim=Floor[nn/logs]; t={}; Do[z={i, j, k, l, m}.logs; If[z<nn, AppendTo[t, 2^z]], {i, 0, lim[[1]]}, {j, 0, lim[[2]]}, {k, 0, lim[[3]]}, {l, 0, lim[[4]]}, {m, 0, lim[[5]]}]; t=Sort[t] (* corrected by Amiram Eldar, Jun 07 2026 *)
PROG
(Python)
from sympy import integer_log
from oeis_sequences.OEISsequences import bisection
def A143512(n):
def f(x):
c = n+x
for i in range(integer_log(x, 65537)[0]+1):
for j in range(integer_log(m:=x//65537**i, 257)[0]+1):
for k in range(integer_log(r:=m//257**j, 17)[0]+1):
for t in range(integer_log(u:=r//17**k, 5)[0]+1):
c -= integer_log(u//5**t, 3)[0]+1
return c
return bisection(f, n, n) # Chai Wah Wu, Jun 07 2026
(Python)
from itertools import islice
from heapq import heappop, heappush
def A143512_gen(): # generator of terms if the first n terms are desired.
h, hset = [1], {1}
while True:
yield (m:=heappop(h))
for p in (3, 5, 17, 257, 65537):
k = m*p
if k not in hset:
heappush(h, k)
hset.add(k)
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Aug 21 2008
STATUS
approved
