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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A105581 Primes whose indices are palindromic. 2
2, 3, 5, 7, 11, 13, 17, 19, 23, 31, 79, 137, 193, 257, 317, 389, 457, 523, 547, 607, 661, 739, 811, 877, 947, 1019, 1087, 1153, 1231, 1301, 1399, 1459, 1531, 1601, 1667, 1747, 1831, 1907, 1999, 2081, 2141, 2239, 2309, 2381, 2447, 2549, 2647, 2699, 2777, 2851 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
prime(22) = 79 prime(33) = 137 the 11th and 12th entries.
MATHEMATICA
Prime[#]&/@Select[Range[500], PalindromeQ] (* Harvey P. Dale, Nov 24 2022 *)
PROG
(PARI) g(n) = for(x=1, n, if(ispal(x), print1(prime(x)", "))) ispal(n) = { local(len, s1, s2); n=Str(n); len=length(n)\2; s1 = left(n, len); s2 = right(n, len); if(s1 == rev(s2), return(1), return(0)) } left(str, n) = \ Get the left n characters from string str. { local(v, tmp, x); v =""; tmp = Vec(str); ln=length(tmp); if(n > ln, n=ln); for(x=1, n, v=concat(v, tmp[x]); ); return(v) } right(str, n) = \ Get the right n characters from string str. { local(v, ln, s, x); v =""; tmp = Vec(str); ln=length(tmp); if(n > ln, n=ln); s = ln-n+1; for(x=s, ln, v=concat(v, tmp[x]); ); return(v) } rev(str) = \ Get the reverse of the input string { local(tmp, s, j); tmp = Vec(Str(str)); s=""; forstep(j=length(tmp), 1, -1, s=concat(s, tmp[j])); return(s) }
CROSSREFS
Cf. A258433.
Sequence in context: A219528 A341660 A033875 * A258433 A262363 A050264
KEYWORD
easy,nonn,base
AUTHOR
Cino Hilliard, May 03 2005
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 December 3 18:58 EST 2023. Contains 367540 sequences. (Running on oeis4.)