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?
LINKS
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
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Feb 24 2016
STATUS
approved