login
a(n) is the first emirp that starts a chain of exactly n emirps under the mapping f(x) = x + reverse(x) + 1.
0

%I #9 Jun 25 2021 04:07:54

%S 13,149,70949,12314597

%N a(n) is the first emirp that starts a chain of exactly n emirps under the mapping f(x) = x + reverse(x) + 1.

%C a(n) == 5 (mod 6) for n >= 2.

%C No more terms < 16*10^11. - _Lars Blomberg_, Jun 25 2021

%e a(1) = 13 is the first emirp, but 13+31+1 = 45 is not an emirp.

%e a(2) = 149 because 149 and 149+941+1 = 1091 are emirps, but 1091+1901+1 = 2993 is not an emirp.

%e a(3) = 70949 because 70949, 70949+94907+1 = 165857, and 165857+758561 = 924419 are emirps, but 924419+914429+1 = 1838849 is not an emirp.

%p revdigs:= proc(n) local L,i;

%p L:= convert(n,base,10);

%p add(L[-i]*10^(i-1),i=1..nops(L))

%p end proc:

%p f:= proc(n) local r,t,x;

%p x:= n;

%p for t from 0 do

%p if not isprime(x) then return t fi;

%p r:= revdigs(x);

%p if not (r <> n and isprime(x) and isprime(r)) then return t fi;

%p x:= x+r+1;

%p od;

%p end proc:

%p V:= Vector(4): V[1]:= 13: count:= 1:

%p for n from 17 by 6 while count < 4 do

%p v:= f(n);

%p if v > 0 and V[v] = 0 then V[v]:= n; count:= count+1 fi;

%p od:

%p convert(V,list);

%Y Cf. A006567.

%K nonn,base,more

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Jun 10 2021