OFFSET
1,2
COMMENTS
Theorem: a(n) > 0 for all n > 4.
REFERENCES
D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, 1996, Section VII.18, p. 247.
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
FORMULA
MATHEMATICA
Table[2 Prime[n]^2 - Prime[n+1]^2, {n, 45}] (* Vincenzo Librandi, Jun 22 2018 *)
2#[[1]]-#[[2]]&/@Partition[Prime[Range[50]]^2, 2, 1] (* Harvey P. Dale, May 15 2023 *)
PROG
(PARI) a(n) = 2*prime(n)^2 - prime(n + 1)^2; \\ Harry J. Smith, Sep 06 2009
(Magma) [2*NthPrime(n)^2 - NthPrime(n+1)^2: n in [1..45]]; // Vincenzo Librandi, Jun 22 2018
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Oct 15 2001
STATUS
approved