OFFSET
1,1
COMMENTS
Equivalently, a(n) is the least k such that prime(k+1) - prime(k) = prime(k) - prime(k-n). - Giovanni Resta, Apr 03 2017
FORMULA
EXAMPLE
3 is the smallest solution of f(k) = f(k-1); so a(1) = 3. 4 is the smallest solution of f(k) = f(k-1)+f(k-2); so a(2) = 4. 114 is the smallest solution of f(k) = f(k-1)+f(k-2)+f(k-3); so a(3) = 114.
MATHEMATICA
a[n_] := Block[{k=n+1}, While[2 Prime[k] != Prime[k + 1] + Prime[k - n], k++]; k]; Array[a, 8] (* Giovanni Resta, Apr 03 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jan 03 2002
EXTENSIONS
a(6)-a(30) from Giovanni Resta, Apr 04 2017
Definition corrected by David A. Corneth, Apr 04 2017
STATUS
approved