login
A269313
Consider a prime with k>1 digits. Take the sum of its k digits. Repeat the process deleting the first addendum and adding the previous sum. The sequence lists the least prime that is reached after some iterations.
1
2, 7, 23, 19, 5, 11, 5, 17, 5, 7, 11, 11, 23, 7, 13, 17, 13, 41, 11, 17, 23, 2, 7, 53, 19, 5, 19, 5, 11, 13, 11959, 7, 13, 19, 89, 11, 17, 19, 11, 13, 17, 19, 11, 7, 11, 13, 47, 89, 7, 23, 47, 11, 17, 29, 53, 11, 13, 43, 17, 5, 7, 11, 7, 13, 971, 29, 11, 17, 29
OFFSET
1,1
COMMENTS
First values with more than five hundred digits for 2689 (563 digits), 8761 (537 digits), 24251 (690) and 40787 (609).
First values with more than one thousand digits for 44129 (1021 digits) and 82361 (1502 digits).
First value with more than two thousand digits for 40819 (2909 digits).
Within the first 10^4 primes the record is for 62659 with 4526 digits.
Does any prime reach another one?
EXAMPLE
11: 1 + 1 = 2.
13: 1 + 3 = 4; 3 + 4 = 7;
17: 1 + 7 = 8; 7 + 8 = 15; 8 + 15 = 23.
MAPLE
with(numtheory): P:=proc(q, h) local a, b, c, d, k, n, t, v; v:=array(1..h);
for n from 10 to q do if isprime(n) then a:=n; b:=ilog10(n)+1;
for k from 1 to b do v[b-k+1]:=(a mod 10); a:=trunc(a/10); od; t:=b+1; v[t]:=add(v[k], k=1..b);
while not isprime(v[t]) do t:=t+1; v[t]:=add(v[k], k=t-b..t-1); od;
print(v[t]); fi; od; end: P(10^4, 10000);
MATHEMATICA
Table[d = IntegerDigits[Prime[n]]; While[! PrimeQ[Total[d]], d = Join[Rest[d], {Total[d]}]]; Total[d], {n, 5, 100}] (* Robert Price, May 22 2019 *)
CROSSREFS
Sequence in context: A125285 A170870 A122631 * A147969 A235985 A045381
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Feb 24 2016
STATUS
approved