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

A253717
Primes equal to their partial cyclical digital sum numbers.
2
2, 3, 5, 7, 11, 13, 17, 31, 53, 71, 101, 131, 157, 173, 181, 197, 211, 283, 431, 439, 457, 461, 487, 509, 571, 601, 643, 727, 911, 929, 1021, 1031, 1033, 1051, 1093, 1151, 1163, 1171, 1201, 1231, 1249, 1259, 1301, 1303, 1327, 1373, 1399, 1429, 1451, 1453, 1493
OFFSET
1,1
COMMENTS
Subsequence of primes of A106039. - Michel Marcus, May 03 2015
LINKS
EXAMPLE
Prime(37) = 157 = (1+5+7)*12 + 1.
Prime(40) = 173 = (1+7+3)*15 + 1+7.
Prime(42) = 181 = (1+8+1)*18 + 1.
MATHEMATICA
terms = {}; (Do[p = Prime[n]; iD = IntegerDigits[p]; iD[[0]] = 0;
a = Apply[Plus, iD]; pf = p - Mod[p, Floor[p/a]*a];
(Do[pf = pf + Apply[Plus, iD[[i]]];
If[pf == p, AppendTo[terms, pf]], {i, 0, IntegerLength[Prime[n]]}]), {n,
1, 1000}]); Union[terms]
PROG
(PARI) isok(n) = {my(v = divrem(n, sumdigits(n))[2]); if (!v, return (1)); d = digits(n); for (i=1, #d, v -= d[i]; if (!v, return (1)); ); return (0); }
lista(nn) = forprime (n=1, nn, if (isok(n), print1(n, ", "))); \\ Michel Marcus, May 03 2015
(Haskell)
a253717 n = a253717_list !! (n-1)
a253717_list = filter ((== 1) . a010051') a106039_list
-- Reinhard Zumkeller, May 07 2015
CROSSREFS
Cf. A257275.
Cf. A106039.
Sequence in context: A276132 A202264 A377266 * A186307 A321420 A118725
KEYWORD
nonn,base
AUTHOR
V.J. Pohjola, May 02 2015
STATUS
approved