OFFSET
0,1
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
LINKS
Giovanni Resta, Table of n, a(n) for n = 0..100
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Andrew Heathwaite, Sep 26 2019
EXTENSIONS
a(7) corrected and more terms added by Felix Fröhlich, Sep 27 2019
More terms from Giovanni Resta, Sep 27 2019
STATUS
approved