login
a(n) = prime(n)*(prime(n+1)-1)/2.
2

%I #20 Sep 08 2022 08:44:39

%S 2,6,15,35,66,104,153,209,322,435,558,740,861,989,1222,1537,1770,2013,

%T 2345,2556,2847,3239,3652,4272,4850,5151,5459,5778,6104,7119,8255,

%U 8908,9453,10286,11175,11778,12717

%N a(n) = prime(n)*(prime(n+1)-1)/2.

%H Harvey P. Dale, <a href="/A014303/b014303.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A000040(n)*A005097(n). - _Omar E. Pol_, Sep 14 2013

%t (#[[1]](#[[2]]-1))/2&/@Partition[Prime[Range[40]],2,1] (* _Harvey P. Dale_, Jan 13 2014 *)

%o (PARI) vector(40, n, prime(n)*(prime(n+1)-1)/2) \\ _G. C. Greubel_, Jun 12 2019

%o (Magma) [NthPrime(n)*(NthPrime(n+1)-1)/2: n in [1..40]]; // _G. C. Greubel_, Jun 12 2019

%o (Sage) [nth_prime(n)*(nth_prime(n+1)-1)/2 for n in (1..40)] # _G. C. Greubel_, Jun 12 2019

%Y Cf. A000040, A005097, A014302.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_