A096238 Number of n-digit base-5 deletable primes.
2, 6, 14, 32, 69, 156, 377, 855, 2072, 5131, 12922, 32619, 83945, 217305, 571560, 1517012, 4056107
Offset: 1
Programs
-
Mathematica
b = 5; a = {2}; d = {2, 3}; For[n = 2, n <= 8, n++, p = Select[Range[b^(n - 1), b^n - 1], PrimeQ[#] &]; ct = 0; For[i = 1, i <= Length[p], i++, c = IntegerDigits[p[[i]], b]; For[j = 1, j <= n, j++, t = Delete[c, j]; If[t[[1]] == 0, Continue[]]; If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; ct++; Break[]]]]; AppendTo[a, ct]]; a (* Robert Price, Nov 12 2018 *)
Extensions
12 more terms from Ryan Propper, Jul 19 2005
Comments