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.

A117785 Total number of palindromic primes in base 8 below 8^n.

This page as a plain text file.
%I A117785 #13 Feb 16 2025 08:33:00
%S A117785 4,4,17,17,64,64,375,375,2319,2319,15130,15130,99554,99554,675166,
%T A117785 675166,4753617,4753617,33752394,33752394,239605153,239605153
%N A117785 Total number of palindromic primes in base 8 below 8^n.
%C A117785 Every palindrome with an even number of digits is divisible by 11 (in base 8) and therefore is composite (not prime). Hence there is no palindromic prime with an even number of digits.
%H A117785 Eric Weisstein: <a href="https://mathworld.wolfram.com/PalindromicPrime.html">Palindromic Prime</a>.
%p A117785 revdigs:= proc(n) local L,i;
%p A117785   L:= convert(n,base,8);
%p A117785   add(L[-i]*8^(i-1),i=1..nops(L))
%p A117785 end proc:
%p A117785 f:= proc(d) local x,y;
%p A117785      nops(select(isprime, [seq(seq(x*8^(d+1)+y*8^d+revdigs(x), y=0..7),x=8^(d-1)..8^d-1)]));
%p A117785 end proc:
%p A117785 T:= ListTools:-PartialSums([4, op(map(f,[$1..6]))]):
%p A117785 map(t -> (t,t), T); # _Robert Israel_, Aug 01 2019
%Y A117785 Cf. A029976, A006341.
%Y A117785 Partial sums of A117786.
%K A117785 nonn,base,more
%O A117785 1,1
%A A117785 _Martin Renner_, Apr 15 2006
%E A117785 a(9)-a(22) from _Robert Israel_, Aug 01 2019, using data from A117786.