OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The d sequence starting at prime(7) = 17 is d(7) = 2, d(8) = 4, d(9) = 6, d(10) = 2, with three numbers before the first duplication, so a(7) = 3.
MAPLE
P:= [seq(ithprime(i), i=1..1000)]:
G:= P[2..-1]-P[1..-2]:
R:= Vector(990):
for i from 1 to 990 do
for k from 1 while nops(convert(G[i..i+k-1], set))=k do od:
R[i]:= k-1;
od:
convert(R, list);
MATHEMATICA
f[n_] := Block[{k = 1}, While[p = Table[ Prime[i], {i, n, n + k}]; Length[ Union[ Drop[p, 1] - Drop[p, -1]]] == k, k++ ]; k - 1]; Table[ f[n], {n, 1, 105}]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
N. J. A. Sloane, Jan 07 2003
EXTENSIONS
More terms from Robert G. Wilson v, Jan 07 2002
STATUS
approved