

A117782


Total number of palindromic primes in base 6 with n digits.


1



3, 1, 6, 0, 21, 0, 95, 0, 445, 0, 2181, 0, 11496, 0, 59723, 0, 315949, 0, 1718494, 0, 9403664, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Every palindrome with an even number of digits is divisible by 11 (in base 6) and therefore is composite (not prime). Hence there is only one palindromic prime with an even number of digits.
A palindromic prime > 3 in base 6 must start (and end) with either the digit 1 or the digit 5.  Chai Wah Wu, Dec 03 2015


LINKS

Table of n, a(n) for n=1..22.
Eric Weisstein: Palindromic Prime.


EXAMPLE

a(2) = 1, because 11(6) = 7(10), is the only palindromic prime with 2 digits.  Michel Marcus, Oct 11 2014


MATHEMATICA

Length@ Select[Prime@ Range[PrimePi[6^# + 1], PrimePi[6^(# + 1)]], # == Reverse@ # &@ IntegerDigits[#, 6] &] & /@ Range[0, 8] (* Michael De Vlieger, Dec 06 2015 *)


PROG

(PARI) a(nd, b=6) = {if ((nd > 2) && ((nd % 2) == 0), return (0)); nb = 0; forprime(p = b^(nd1), b^nd1, d = digits(p, b); if (Pol(d) == Polrev(d), nb++); ); nb; } \\ Michel Marcus, Oct 11 2014


CROSSREFS

Cf. A029974, A117701.
Sequence in context: A083238 A344574 A337604 * A317855 A301331 A301333
Adjacent sequences: A117779 A117780 A117781 * A117783 A117784 A117785


KEYWORD

nonn,base,more


AUTHOR

Martin Renner, Apr 15 2006


EXTENSIONS

a(11)a(12) from Michel Marcus, Oct 11 2014
a(13)a(22) from Chai Wah Wu, Dec 03 2015


STATUS

approved



