OFFSET
1,1
COMMENTS
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
FORMULA
a(k) = 2^(n+1) - 1; a(k+1) = 2^(n+1) + 1, where k = A008466(n+1).
MATHEMATICA
Select[Range[100], DigitCount[#, 2, 1] > IntegerExponent[#, 2] + 1 &]
PROG
(Python)
def isa(n): return (n - 1).bit_count() < ((n.bit_count() - 1) << 1)
print([n for n in range(100) if isa(n)]) # Peter Luschny, Jun 07 2024
(PARI) isok(k) = hammingweight(k) > valuation(2*k, 2); \\ Michel Marcus, Jun 07 2024
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Paolo Xausa, Jun 01 2024
STATUS
approved