Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
login
A068234
a(n) is the smallest prime p such that p and the next n-1 primes are all == 5 (mod 12).
8
5, 509, 4397, 42509, 647417, 647417, 1248869, 13175609, 234946997, 1039154933, 7114719473, 32021552837, 32021552837, 1237381737257, 2904797643617, 2904797643617, 2904797643617
OFFSET
1,1
COMMENTS
Dickson's conjecture implies that a(n) exists for all n.
a(18) > 4*10^14. - Giovanni Resta, Aug 04 2013
MATHEMATICA
For[i=n=1, True, Null, For[j=0, j<n&&Mod[Prime[i+j], 12]==5, j++, Null]; If[j==n, Print[Prime[i]]; n++, i++ ]]
Module[{nn=129*10^5, pr5}, pr5=Table[If[Mod[Prime[n], 12]==5, 1, 0], {n, nn}]; Prime[ #]&/@Flatten[Table[SequencePosition[pr5, PadRight[{}, k, 1], 1], {k, 9}], 1][[All, 1]]] (* The program generates the first 9 terms of the sequence. *) (* Harvey P. Dale, Feb 02 2022 *)
PROG
(PARI) {i=n=1; while(1, j=0; while(j<n&&prime(i+j)%12==5, j++); if(j==n, print(prime(i)); n++, i++))}
KEYWORD
nice,nonn
AUTHOR
Ferenc Adorjan (fadorjan(AT)freemail.hu), Feb 22 2002
EXTENSIONS
Edited by Dean Hickerson, Mar 06 2002
More terms from Giovanni Resta, Feb 18 2006
STATUS
approved