OFFSET
1,1
COMMENTS
Nonpowers of 2 that are of the form h*10^j + 2^k with j > k*log10(2) and h > 0.
LINKS
Stefano Spezia, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Range[162], !IntegerQ[Log2[#]] && Sum[Boole[IntegerQ[Log2[FromDigits[Drop[IntegerDigits[#], i]]]]], {i, IntegerLength[#]}] > 0 &]
(* Alternative: *)
nn = 162; s = 2^Range[0, Floor@ Log2[nn]]; Complement[Union@ Reap[Map[(w = IntegerDigits[#]; i = 1; While[Set[k, FromDigits@Join[IntegerDigits[i], w]] <= nn, Sow[k]; i++]) &, s] ][[-1, 1]], s] (* Michael De Vlieger, Jun 25 2025 *)
PROG
(PARI) isp2(k) = k==1<<valuation(k, 2); \\ A209229
isok(k) = if (!isp2(k), for (i=1, oo, my(z=k % 10^i); if (z==k, return(0), if (z && isp2(z), return(1))))); return(0); \\ Michel Marcus, Jun 24 2025
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Jun 23 2025
STATUS
approved
