OFFSET
1,1
COMMENTS
When a(n)=1, p(n) and p(n+1) are twin primes.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
FORMULA
For n>1: a(n) = ((p(n+1)-p(n))/2)^2. - Reinhard Zumkeller, Oct 22 2002
EXAMPLE
a(154) = 100 because p(154)*p(155) + 100 = 804609 = 897^2.
MATHEMATICA
Flatten[{3, Table[((Prime[n+1]-Prime[n])/2)^2, {n, 2, 100}]}] (* Vaclav Kotesovec, Mar 23 2014 *)
Join[{3}, ((#[[2]]-#[[1]])/2)^2&/@Partition[Prime[Range[2, 100]], 2, 1]] (* Harvey P. Dale, Dec 04 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Oct 02 2002
STATUS
approved