OFFSET
0,4
COMMENTS
More than the usual number of terms are displayed in order to show the first 6.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..30103
EXAMPLE
The sixth palindromic prime is 101, so a(101)=6.
MAPLE
# SEQPI: produces the pi function for a monotonic sequence a[]
# Returns list b[], where b[n+1} gives number of terms in range 0 to n.
# Generates at least M terms of b (if possible) and then stops at the next convenient stopping point.
SEQPI:=proc(a, M) local b, la, L, i, s, at, ct, h:
if whattype(a) <> list then RETURN([]); fi:
la:=nops(a); b:=[]: L:=min(a[la], M);
ct:=0;
s:=0;
for at from 1 to la do
for i from s to a[at]-1 do b:=[op(b), ct]; od:
ct:=ct+1;
s:=a[at];
if s>L then break; fi;
od:
b:=[op(b), ct];
RETURN(b);
end;
# Assume b2385 has the first 1000 terms of A002385
SEQPI(b2385, 20000):
MATHEMATICA
Accumulate[Table[If[PrimeQ[n]&&PalindromeQ[n], 1, 0], {n, 0, 200}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 29 2017 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Oct 15 2015
STATUS
approved