

A345398


a(n) is the least number k such that {k, k^2, ..., k^n} are all evil numbers (A001969), but k^(n+1) is not.


1



5, 45, 3, 27, 291, 365, 3359, 287, 10667, 6369, 783, 19099, 20249, 34391, 80577, 92589, 346683, 2805901, 211183, 1995137, 10772261, 12111871, 56209883, 4270443, 17026791, 508415591, 583443823, 317108969, 4043934391, 979104339, 6044000725, 29368426407, 21911775681, 26576734759
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS

Table of n, a(n) for n=1..34.


EXAMPLE

5 is a term since it is an evil number (5 = 101_2 has 2 1's), but 5^2 = 25 is not (25 = 11001_2 has 3 1's), and 5 is the least number with this property.


MATHEMATICA

evilQ[n_] := EvenQ @ DigitCount[n, 2, 1]; f[n_] := Module[{e = 0, r = n}, While[evilQ[r], r *= n; e++]; e]; m = 15; s = Table[0, {m}]; c = 0; n = 2; While[c < m, k = f[n]; If[0 < k <= m && s[[k]] == 0, c++; s[[k]] = n]; n++]; s


CROSSREFS

Cf. A001969, A345399.
Sequence in context: A215584 A262116 A096763 * A341383 A214711 A216767
Adjacent sequences: A345395 A345396 A345397 * A345399 A345400 A345401


KEYWORD

nonn,base


AUTHOR

Amiram Eldar, Jun 17 2021


STATUS

approved



