OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = prime(n)*(prime(n+1) - prime(n)).
EXAMPLE
For n = 6 prime(6) = 13, prime(7) = 17 the gap is 17 - 13 = 4. So 13 * 4 = 52 and 52 is the sixth term.
MATHEMATICA
Array[With[{p = Prime@ #}, p (NextPrime[p] - p)] &, 50] (* Michael De Vlieger, Sep 03 2017 *)
Module[{nn=60, dnp}, dnp=Differences[Prime[Range[nn+1]]]; Times@@@Thread[ {Prime[Range[nn]], dnp}]] (* Harvey P. Dale, Mar 24 2022 *)
PROG
(PARI) forprime(p=2, 200, print1(p*nextprime(p+1)-p^2, ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Dimitris Valianatos, Aug 24 2017
STATUS
approved