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.

User: Andrew Heathwaite

Andrew Heathwaite's wiki page.

Andrew Heathwaite has authored 1 sequences.

A327820 Smallest prime with n holes in its decimal digits.

Original entry on oeis.org

2, 19, 83, 89, 809, 1889, 4889, 46889, 48889, 468889, 688889, 3888889, 4888889, 28888889, 88884889, 288888889, 808888889, 4488888889, 8688888889, 48808888889, 48888888889, 288888888889, 888088888889, 1888888888889, 4888888888889, 48808888888889, 88848888888889
Offset: 0

Author

Andrew Heathwaite, Sep 26 2019

Keywords

Comments

Smallest prime p such that A064692(p) = n. Also record-holders in A327462. - Felix Fröhlich, Sep 27 2019
The sequence is not monotonically increasing: a(32) > a(33). - Giovanni Resta, Sep 27 2019

Crossrefs

Programs

  • Mathematica
    s[0] = {1,2,3,5,7}; s[1] = {0,4,6,9}; s[2] = {8}; m[{sn_, t_}] := Union[Sort /@ Tuples[s[sn], {t}]]; f[nd_, nh_] := Block[{v, pa = Tally /@ IntegerPartitions[ nh, {nd}, {0, 1, 2}], bst = Infinity}, Do[v = Flatten /@ Tuples[m /@ p]; Do[z = Select[ FromDigits /@ Select[ Permutations[e], First[#] > 0 && OddQ[Last[#]] &], PrimeQ]; bst = Min[bst, {z}], {e, v}], {p, pa}]; bst]; a[0]=2; a[n_] := Block[{nd = Ceiling[(n + 1)/2], b}, While[! IntegerQ@ (b = f[nd, n]), nd++]; b]; a /@ Range[0, 30] (* Giovanni Resta, Sep 27 2019 *)
  • PARI
    count_holes(n) = my(d=digits(n), i=0); for(k=1, #d, if(d[k]==0 || d[k]==4 || d[k]==6 || d[k]==9, i++, if(d[k]==8, i+=2))); i
    a(n) = forprime(p=1, , if(count_holes(p)==n, return(p))) \\ Felix Fröhlich, Sep 27 2019

Extensions

a(7) corrected and more terms added by Felix Fröhlich, Sep 27 2019
More terms from Giovanni Resta, Sep 27 2019