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”).

A252666
Let k be the smallest number such that s(k) = odd part of digital sum of 2^k is multiple of prime(n); then a(n)=k, if s(k) = prime(n). Otherwise, or if there is no such k, a(n)=0.
3
5, 4, 7, 8, 47, 12, 42, 19, 20, 24, 23, 28, 31, 76, 35, 34, 38, 39, 48, 52, 116, 63, 0, 140, 68, 81, 66, 89, 96, 198, 97, 92, 415, 94, 0, 229, 119, 121, 539, 132, 133, 146, 292, 162, 158, 148, 651, 164, 153, 167, 196, 165, 757, 205, 201, 0, 184, 175
OFFSET
3,1
COMMENTS
We conjecture that k in the definition exists for every n>=3.
a(n)=0 for n = 25, 37, 58, ... .
EXAMPLE
If n=3, evidently, k=5, since 2^5=32, s(5)= 3+2 = 5 = prime(3). So a(3)=5.
If n=25, then k=387, but s(387)>prime(25)=97, so a(25)=0 (the equation s(x)=97 has the smallest solution x=517).
PROG
(PARI) s(k) = my(sd = sumdigits(2^k)); sd/2^valuation(sd, 2);
a(n) = {p = prime(n); k = 1; while ((sk=s(k)) % p, k++); if (sk == p, k, 0); } \\ Michel Marcus, Dec 29 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Dec 20 2014
EXTENSIONS
More terms from Peter J. C. Moses, Dec 20 2014
STATUS
approved