A291463 a(n) is the product of n-th prime number with the distance to the next prime.
2, 6, 10, 28, 22, 52, 34, 76, 138, 58, 186, 148, 82, 172, 282, 318, 118, 366, 268, 142, 438, 316, 498, 712, 388, 202, 412, 214, 436, 1582, 508, 786, 274, 1390, 298, 906, 942, 652, 1002, 1038, 358, 1810, 382, 772, 394, 2388, 2532, 892, 454, 916, 1398, 478, 2410
Offset: 1
Keywords
Examples
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.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
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 *)
-
PARI
forprime(p=2,200, print1(p*nextprime(p+1)-p^2, ", "))
Formula
a(n) = prime(n)*(prime(n+1) - prime(n)).