login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A085515
Order of first occurrence of a sequence of exactly n consecutive primes of the form 6*k+1.
3
1, 2, 3, 6, 4, 5, 7, 8, 10, 11, 9, 13, 12, 15, 16, 14, 17, 18, 21, 19, 20, 23, 22, 25, 24, 26, 31, 27, 28, 30, 29, 32, 34, 33, 35
OFFSET
1,2
COMMENTS
This sequence gives the index of A055625(n) after sorting by increasing magnitude.
EXAMPLE
a(3)=3, a(4)=6, a(5)=4 because the first occurrence of exactly 6 consecutive primes of the form 6*k+1 (1741,1747,1753,1759,1777,1783) occurs after the first occurrence of 3 consecutive primes of this form (151,157,163) and before the first occurrence of 4 consecutive "6k+1"-primes (3049,3061,3067,3079).
MATHEMATICA
(* Program not suitable to compute a large number of terms. *)
pp = Table[{p = Prime[n], Mod[p, 6]}, {n, 10^7}];
sp = Split[pp, Mod[#1[[2]], 6] == Mod[#2[[2]], 6]&];
b[n_] := SelectFirst[sp, Length[#] == n && MatchQ[#, {{_Integer, 1} ..}]& ][[1, 1]];
Sort[Table[{b[n], n}, {n, 1, 16}]][[All, 2]] (* Jean-François Alcover, Nov 21 2018 *)
PROG
FORTRAN program given at link.
CROSSREFS
Cf. A055625, A085516 (sorted occurrence of first runs of "6k-1" primes).
Sequence in context: A132368 A157248 A368229 * A082354 A130344 A122344
KEYWORD
more,nonn
AUTHOR
Hugo Pfoertner, Jul 31 2003
EXTENSIONS
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 27 2006
a(32)-a(35) from Giovanni Resta, Aug 04 2013
STATUS
approved