login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A345399
a(n) is the least number k such that {k, k^2, ..., k^n} are all odious numbers (A000069), but k^(n+1) is not.
1
13, 7, 25, 59, 193, 313, 1447, 103, 2431, 1305, 29089, 21117, 10525, 26663, 63271, 25127, 106501, 215735, 1143579, 5115041, 810163, 9554677, 23932393, 13101403, 14299679, 62266699, 739155479, 37795511, 4015916137, 3197105709, 5386711727, 14904706741, 20696039773
OFFSET
1,1
EXAMPLE
13 is a term since it is an odious number (13 = 1101_2 has 3 1's), but 13^2 = 169 is not (169 = 10101001_2 has 4 1's), and 13 is the least number with this property.
MATHEMATICA
odQ[n_] := n > 1 && OddQ[n]; odiousQ[n_] := odQ @ DigitCount[n, 2, 1]; f[n_] := Module[{e = 0, r = n}, While[odiousQ[r], r *= n; e++]; e]; m = 15; s = Table[0, {m}]; c = 0; n = 1; While[c < m, k = f[n]; If[0 < k <= m && s[[k]] == 0, c++; s[[k]] = n]; n++]; s
CROSSREFS
Sequence in context: A364091 A257928 A206611 * A298257 A298928 A152142
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jun 17 2021
STATUS
approved