login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082623 a(1) = 5, a(n) = smallest palindromic prime obtained by inserting two digits anywhere in a(n-1). 4
5, 151, 10501, 1035301, 103515301, 10325152301, 1013251523101, 101325181523101, 10132512821523101, 1013251428241523101, 101322514282415223101, 10132245142824154223101, 1013224514281824154223101, 101322451402818204154223101, 10132245014028182041054223101 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(78) is the last term, as none of the candidates for a(79) is prime. - Giovanni Resta, Sep 20 2019
LINKS
MAPLE
cp:= proc(x, y) if x[1] < y[1] then true
elif x[1] > y[1] then false
elif nops(x)=1 then true
else procname(x[2..-1], y[2..-1])
fi
end proc: A[1]:= 5: L:= [5]:
for n from 2 to 15 do
nL:= nops(L);
Lp:= sort([seq(seq([op(L[1..i]), x, op(L[i+1..-1])], x=`if`(i=0, 1..9, 0..9)), i=0..nL)], cp);
cands:= map(t -> add(t[i]*(10^(i-1)+10^(2*nL+1-i)), i=1..nL)+t[nL+1]*10^(nL), Lp);
found:= false;
for i from 1 to nops(cands) do
if isprime(cands[i]) then
A[n]:= cands[i];
L:= Lp[i];
found:= true;
break
fi
od;
if not found then break fi
od:
seq(A[i], i=1..15); # Robert Israel, Jan 03 2017, corrected Sep 20 2019
CROSSREFS
Sequence in context: A107691 A181979 A258486 * A332115 A262655 A075598
KEYWORD
base,fini,full,nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 29 2003
EXTENSIONS
Terms after a(4) corrected by Giovanni Resta, Sep 20 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)