OFFSET
1,1
COMMENTS
Next term, a(27) > 3*10^7.
EXAMPLE
Consider the sequence of odd primes modulo 4: S= 3, 1, 3, 3, 1, 1, 3, 3, 1, 3, 1, 1, 3, 3, 1, 3, 1,... . Then
a(1)=3 because 2nd appearance of 3 is S(3),
a(2)=4 because 2nd appearance of (3,1) begins at S(4),
a(3)=8 because 2nd appearance of (3,1,3) begins at S(8),
a(4)=16 because 2nd appearance of (3,1,3,3) begins at S(16).
MATHEMATICA
nn=3*10^7; s=Table[Mod[Prime[n], 4], {n, 2, nn}]; Reap[k1=2; Do[tn=Take[s, n]; Do[If[tn==Take[s, {k, k+n-1}], Sow[k]; k1=k; Break[]], {k, k1, nn-n-1}], {n, 26}]][[2, 1]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Dec 09 2011
STATUS
approved