A034953 Triangular numbers (A000217) with prime indices.
3, 6, 15, 28, 66, 91, 153, 190, 276, 435, 496, 703, 861, 946, 1128, 1431, 1770, 1891, 2278, 2556, 2701, 3160, 3486, 4005, 4753, 5151, 5356, 5778, 5995, 6441, 8128, 8646, 9453, 9730, 11175, 11476, 12403, 13366, 14028, 15051, 16110, 16471, 18336, 18721, 19503
Offset: 1
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Triangular Number.
Crossrefs
Programs
-
Haskell
a034953 n = a034953_list !! (n-1) a034953_list = map a000217 a000040_list -- Reinhard Zumkeller, Sep 23 2011
-
Maple
a:= n-> (p-> p*(p+1)/2)(ithprime(n)): seq(a(n), n=1..65); # Alois P. Heinz, Apr 20 2022
-
Mathematica
t[n_] := n(n + 1)/2; Table[t[Prime[n]], {n, 44}] (* Robert G. Wilson v, Aug 12 2004 *) (#(# + 1))/2&/@Prime[Range[50]] (* Harvey P. Dale, Feb 27 2012 *) With[{nn=200},Pick[Accumulate[Range[nn]],Table[If[PrimeQ[n],1,0],{n,nn}],1]] (* Harvey P. Dale, Mar 05 2023 *)
-
PARI
forprime(p=2,1e3,print1(binomial(p+1,2)", ")) \\ Charles R Greathouse IV, Jul 19 2011
-
PARI
apply(n->binomial(n+1,2),primes(100)) \\ Charles R Greathouse IV, Jun 04 2013
Formula
a(n) = Sum_{k=1..prime(n)} k. - Wesley Ivan Hurt, Apr 27 2021
Product_{n>=1} (1 - 1/a(n)) = A307868. - Amiram Eldar, Nov 07 2022
Comments