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.

A096242 Number of n-digit base-9 deletable primes.

This page as a plain text file.
%I A096242 #12 Nov 14 2018 02:06:40
%S A096242 4,14,58,221,911,3638,14687,61435,262189,1140171
%N A096242 Number of n-digit base-9 deletable primes.
%C A096242 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 A096242 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 A096242 b = 9; a = {4}; d = {2, 3, 5, 7};
%t A096242 For[n = 2, n <= 5, n++,
%t A096242   p = Select[Range[b^(n - 1), b^n - 1], PrimeQ[#] &];
%t A096242   ct = 0;
%t A096242   For[i = 1, i <= Length[p], i++,
%t A096242    c = IntegerDigits[p[[i]], b];
%t A096242    For[j = 1, j <= n, j++,
%t A096242     t = Delete[c, j];
%t A096242     If[t[[1]] == 0, Continue[]];
%t A096242     If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; ct++;
%t A096242      Break[]]]];
%t A096242   AppendTo[a, ct]];
%t A096242 a (* _Robert Price_, Nov 13 2018 *)
%Y A096242 Cf. A080608, A080603, A096235-A096246.
%K A096242 nonn,base,more
%O A096242 1,1
%A A096242 _Michael Kleber_, Feb 28 2003
%E A096242 5 more terms from _Ryan Propper_, Jul 19 2005