cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A117782 #20 Feb 16 2025 08:33:00
%S A117782 3,1,6,0,21,0,95,0,445,0,2181,0,11496,0,59723,0,315949,0,1718494,0,
%T A117782 9403664,0
%N A117782 Total number of palindromic primes in base 6 with n digits.
%C A117782 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.
%C A117782 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
%H A117782 Eric Weisstein: <a href="https://mathworld.wolfram.com/PalindromicPrime.html">Palindromic Prime</a>.
%e A117782 a(2) = 1, because 11(6) = 7(10), is the only palindromic prime with 2 digits. - _Michel Marcus_, Oct 11 2014
%t A117782 Length@ Select[Prime@ Range[PrimePi[6^# + 1], PrimePi[6^(# + 1)]], # == Reverse@ # &@ IntegerDigits[#, 6] &] & /@ Range[0, 8] (* _Michael De Vlieger_, Dec 06 2015 *)
%o A117782 (PARI) a(nd, b=6) = {if ((nd > 2) && ((nd % 2) == 0), return (0)); nb = 0; forprime(p = b^(nd-1), b^nd-1, d = digits(p, b); if (Pol(d) == Polrev(d), nb++);); nb;} \\ _Michel Marcus_, Oct 11 2014
%Y A117782 Cf. A029974, A117701.
%K A117782 nonn,base,more
%O A117782 1,1
%A A117782 _Martin Renner_, Apr 15 2006
%E A117782 a(11)-a(12) from _Michel Marcus_, Oct 11 2014
%E A117782 a(13)-a(22) from _Chai Wah Wu_, Dec 03 2015