%I #15 Sep 08 2022 08:45:37
%S 3,4,11,16,320,438,1302,1594,3324,8235,9417,17950,24759,27349,36252,
%T 55002,78861,84711,115866,138056,146440,190374,220857,277626,370572,
%U 417629,435933,488096,507799,565157,850338,930999,1072092,1107343
%N a(n) = (prime(n)^3 - prime(n^3))/2.
%H G. C. Greubel, <a href="/A143680/b143680.txt">Table of n, a(n) for n = 1..1000</a>
%e If n=1, then (prime(1)^3-prime(1^3))/2 = (8-2)/2 = 6/2 = 3 = a(1).
%e If n=2, then (prime(2)^3-prime(2^3))/2 = (27-19)/2 = 8/2 = 4 = a(2).
%e If n=3, then (prime(3)^3-prime(3^3))/2 = (125-103)/2 = 22/2 = 11 = a(3).
%e If n=4, then (prime(4)^3-prime(4^3))/2 = (343-311)/2 = 32/2 = 16 = a(4).
%e If n=5, then (prime(5)^3-prime(5^3))/2 = (1331-691)/2 = 640/2 = 320 = a(5), etc.
%p A143680 := proc(n) option remember ; local p; (ithprime(n)^3-ithprime(n^3))/2 ; end: for n from 1 to 40 do printf("%d,",A143680(n)) ; od: # _R. J. Mathar_, Nov 05 2008
%t Table[(Prime[n]^3 - Prime[n^3]) / 2, {n, 50}] (* _Vincenzo Librandi_, Sep 15 2015 *)
%o (PARI) a(n) = (prime(n)^3 -prime(n^3))/2; \\ _Michel Marcus_, Sep 15 2015
%o (Magma) [(NthPrime(n)^3 -NthPrime(n^3))/2: n in [1..40]]; // _Vincenzo Librandi_, Sep 15 2015
%o (Sage) [(nth_prime(n)^3 - nth_prime(n^3))/2 for n in (1..40)] # _G. C. Greubel_, May 29 2021
%Y Cf. A000040.
%Y Cf. A030078, A055875. [_R. J. Mathar_, Nov 05 2008]
%K nonn
%O 1,1
%A _Juri-Stepan Gerasimov_, Nov 01 2008
%E More terms from _R. J. Mathar_, Nov 05 2008