Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #5 Apr 27 2019 02:05:57
%S 0,1,2,3,4,5,6,7,8,9,10,11,11,12,13,14,14,15,15,16,17,18,18,19,20,20,
%T 21,22,22,23,23,24,25,25,26,27,27,27,27,28,28,29,29,30,31,31,31,32,33,
%U 34,34,34,34,35,36,37,37,37,37,38,38,38,39,40,40,41,41,41,41,42,42,43,43,43,44
%N The number of palindromic primes in the first n terms of A006530.
%F #{A006530(i): i<=n and A006530(i) in A002385}.
%e Of the first n=13 terms of A006530, all but two (1 and 13 being the exceptions) are also in A002385, which leads to a(13)=11.
%p A006530 := proc(n) if n = 1 then 1; else numtheory[factorset](n) ; max(op(%)) ; end if; end proc:
%p isA002113 := proc(n) dgs := convert(n,base,10) ; for i from 1 to nops(dgs) do if op(i,dgs) <> op(-i,dgs) then return false; end if; end do: return true; end proc:
%p isA002385 := proc(n) isprime(n) and isA002113(n) ; end proc:
%p A180613 := proc(n) a := 0 ; for i from 1 to n do if isA002385(A006530(i)) then a := a+1 ; end if; end do: a; end proc:
%p seq(A180613(n),n=1..40) ; # _R. J. Mathar_, Sep 25 2010
%K base,nonn,less
%O 1,3
%A _Giovanni Teofilatto_, Sep 12 2010
%E Definition clarified by _R. J. Mathar_, Sep 25 2010