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!)
A088249 Smallest palindromic prime beginning with the n-th prime, or 0 if no such prime exists. 1
2, 3, 5, 7, 11, 131, 17471, 191, 0, 0, 313, 373, 0, 0, 0, 0, 0, 0, 0, 71317, 73037, 797, 0, 0, 97379, 101, 10301, 1074701, 1092901, 11311, 12721, 131, 1371731, 13931, 1490941, 151, 1572751, 16361, 1670761, 1730371, 17971, 181, 191, 19391, 1970791, 19991 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Conjecture: Except for n=1 and 3, a(n) = 0 iff prime(n) has Most Significant digit one among (2,4,5,6,8).
LINKS
EXAMPLE
a(7) = 17471, prime(7) = 17. a(9) = 0, prime(9) = 23 and no such prime exists.
MAPLE
revdigs:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
pali:= proc(n) local d;
d:= ilog10(n);
n*10^d + revdigs(floor(n/10));
end proc:
f:= proc(n) local L, Lp, x, cand, d;
L:= convert(n, base, 10);
if not member(L[-1], [1, 3, 7, 9]) then return 0 fi;
for d from nops(L) to 0 by -1 do
if L[1..d] = ListTools:-Reverse(L[1..d]) then
Lp:= [op(ListTools:-Reverse(L[d+1..-1])), op(L)];
cand:= add(Lp[i]*10^(i-1), i=1..nops(Lp));
if isprime(cand) then return cand fi
fi
od;
for d from 1 do
for x from 0 to 10^d-1 do
cand:= pali(10^d*n+x);
if isprime(cand) then return cand fi;
od;
od
end proc:
f(2):= 2: f(5):= 5:
map(f @ ithprime, [$1..100]); # Robert Israel, Aug 06 2020
CROSSREFS
Sequence in context: A084836 A062351 A185267 * A241724 A186449 A046480
KEYWORD
base,easy,nonn,look
AUTHOR
Amarnath Murthy, Sep 26 2003
EXTENSIONS
More terms from Giovanni Resta, Feb 07 2006
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 19 04:35 EDT 2024. Contains 371782 sequences. (Running on oeis4.)