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.
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
Examples
11: 1 + 1 = 2. 13: 1 + 3 = 4; 3 + 4 = 7; 17: 1 + 7 = 8; 7 + 8 = 15; 8 + 15 = 23.
Links
- Paolo P. Lava, List of values for the primes < 104729 (10000th prime)
Programs
-
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 *)
Comments