OFFSET
1,1
EXAMPLE
n=2: a(2)=24, p(24)=89, followed by {4, 4} consecutive prime differences, surrounded by 6=89-83 and 2=103-101 also as p-differences, both congruent to 2 modulo 4.
MATHEMATICA
dp[x_] := Mod[Prime[x+1]-Prime[x], 4] pat[x_, h_] := Table[dp[x+j], {j, 0, h-1}] up[x_, h_] := Union[pat[x, h]] Table[fa=1; k=0; Do[s=up[n, h]; s1=Length[s]; s2=Part[u=pat[n+1, h], Length[u]]; s3=Part[w=pat[n-1, h], 1]; If[Equal[s, {0}]&&Equal[fa, 1]&&Equal[s2, 2]&&Equal[s3, 2], k=k+1; Print[{k, h, n, Prime[n], s, s1}]; fa=0], {n, 2, 720000}], {h, 1, 14}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Mar 06 2003
EXTENSIONS
a(15)-a(32) from Donovan Johnson, Nov 16 2010
STATUS
approved