OFFSET
1,7
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
pow2Q[n_] := n == 2^IntegerExponent[n, 2]; f[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, If[AllTrue[e, pow2Q[# + 1] &], IntegerExponent[Max @@ e + 1, 2], Nothing]]; f[1] = 0; Array[f, 150]
PROG
(PARI) ispow2(n) = n >> valuation(n, 2) == 1;
lista(kmax) = {my(e); print1(0, ", "); for(k = 2, kmax, e = factor(k)[, 2]; if(ispow2(vecprod(apply(x -> x + 1, e))), print1(valuation(vecmax(e) + 1, 2), ", "))); }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, May 02 2024
STATUS
approved