|
|
A252670
|
|
a(n) is exponential digital index of prime(n).
|
|
1
|
|
|
22, 0, 11, 4, 2, 0, 0, 2, 1, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 2, 1, 2, 1, 0, 0, 0, 0, 0, 2, 0, 0, 1, 2, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 3, 1, 0, 0, 0, 2, 0, 0, 0, 0, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 1, 0, 0, 5, 0, 2, 0, 0, 1, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
For the definition of the exponential digital index of a prime p (EDI(p)), see comment in A252668.
Is 22 the maximal term? Is 11 the second maximal term?
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(PARI) s(k, pp) = my(sd = sumdigits(pp^k)); sd/2^valuation(sd, 2);
f(n, pp) = {my(p = prime(n), k = 1); while ((sk=s(k, pp)) % p, k++); if (sk == p, k, 0); }
a(n) = {my(pp=prime(n), j=3); while (f(j, pp), j++); j - 3; } \\ Michel Marcus, Dec 09 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|