OFFSET
0,1
COMMENTS
Phil Carmody observed "7 must divide at least one of the terms. That's why (apart from the excluded k=0 range) only <=7 of the 8 terms can be prime. If 7 divides 30*k+1, it also divides 30*k+1+4*7." (See sci.math link.)
a(n)=0 for n = 127, 254 and 255.
The maximum value for a(n) is obtained for a(247)=22621.
LINKS
Michel Marcus, Table of n, a(n) for n = 0..255
Phil Carmody, 7 primes in intervals [k*30,(k+1)*30], thread in newsgroup sci.math, Sep 19 2004.
Hugo Pfoertner, Patterns count table
EXAMPLE
MATHEMATICA
max = 10^5; A098591[n_] := Sum[ 2^k*Boole[ PrimeQ[ 30*n + {1, 7, 11, 13, 17, 19, 23, 29}[[k+1]] ] ], {k, 0, 7}]; a[n_] := Catch[ For[ k = 1, k <= max, k++, If[ A098591[k] == n, Throw[k], If[ k >= max, Throw[0]]]]]; Table[ Print[n, " ", an = a[n]]; an, {n, 0, 255}] (* Jean-François Alcover, Jan 31 2013 *)
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Michel Marcus, Jan 31 2013
STATUS
approved