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.

A096238 Number of n-digit base-5 deletable primes.

This page as a plain text file.
%I A096238 #12 Nov 14 2018 02:07:24
%S A096238 2,6,14,32,69,156,377,855,2072,5131,12922,32619,83945,217305,571560,
%T A096238 1517012,4056107
%N A096238 Number of n-digit base-5 deletable primes.
%C A096238 A prime p is a base-b deletable prime if when written in base b it has the property that removing some digit leaves either the empty string or another deletable prime. "Digit" means digit in base b.
%C A096238 Deleting a digit cannot leave any leading zeros in the new string. For example, deleting the 2 in 2003 to obtain 003 is not allowed.
%t A096238 b = 5; a = {2}; d = {2, 3};
%t A096238 For[n = 2, n <= 8, n++,
%t A096238   p = Select[Range[b^(n - 1), b^n - 1], PrimeQ[#] &];
%t A096238   ct = 0;
%t A096238   For[i = 1, i <= Length[p], i++,
%t A096238    c = IntegerDigits[p[[i]], b];
%t A096238    For[j = 1, j <= n, j++,
%t A096238     t = Delete[c, j];
%t A096238     If[t[[1]] == 0, Continue[]];
%t A096238     If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; ct++;
%t A096238      Break[]]]];
%t A096238   AppendTo[a, ct]];
%t A096238 a (* _Robert Price_, Nov 12 2018 *)
%Y A096238 Cf. A080608, A080603, A096235-A096246.
%K A096238 nonn,base,more
%O A096238 1,1
%A A096238 _Michael Kleber_, Feb 28 2003
%E A096238 12 more terms from _Ryan Propper_, Jul 19 2005