OFFSET
0,1
COMMENTS
V(x) is similar to transform T(x) as defined in A243993.
EXAMPLE
n=0: 2
n=1: 29 -> 11
n=2: 661 -> 727 -> 499
n=3: 4289 -> 3607 -> 967 -> 653
n=4: 24247 -> 96661 -> 5227 -> 2749 -> 1913
n=5: 2088221 -> 3286043 -> 6504647 -> 3154001 -> 4469401 -> 5805341
n=6: 4446863 -> 7880449 -> 6568483 -> 9114221 -> 25643 -> 57107 -> 22817
MAPLE
V:=proc(t) local j, w, x, y; x:=t; y:=[]; while x>0 do
y:=[x mod 10, op(y)]; x:=trunc(x/10); od; x:=(y[nops(y)]+y[1]) mod 10;
for j from 1 to nops(y)-1 do x:=x*10+((y[j]+y[j+1]) mod 10); od; x; end:
P:=proc(q) local a, b, n, v; v:=array(0..50);
for n from 0 to 50 do v[n]:=0; od; v[0]:=2; lprint(0, 2);
for n from 1 by 2 to q do if isprime(n) then b:=-1; a:=n;
while isprime(a) do b:=b+1; a:=V(a); od; if v[b]=0 then
v[b]:=n; lprint(b, n); fi; fi; od; end: P(10^10);
CROSSREFS
KEYWORD
nonn,more,base
AUTHOR
Paolo P. Lava, Jul 15 2014
STATUS
approved