%I #53 Mar 05 2023 08:57:43
%S 3,6,15,28,66,91,153,190,276,435,496,703,861,946,1128,1431,1770,1891,
%T 2278,2556,2701,3160,3486,4005,4753,5151,5356,5778,5995,6441,8128,
%U 8646,9453,9730,11175,11476,12403,13366,14028,15051,16110,16471,18336,18721,19503
%N Triangular numbers (A000217) with prime indices.
%C The following sequences (allowing offset of first term) all appear to have the same parity: A034953, triangular numbers with prime indices; A054269, length of period of continued fraction for sqrt(p), p prime; A082749, difference between the sum of next prime(n) natural numbers and the sum of next n primes; A006254, numbers n such that 2n-1 is prime; A067076, 2n+3 is a prime. - _Jeremy Gardiner_, Sep 10 2004
%C Given a rectangular prism with sides 1, p, p^2 for p = n-th prime (n > 1), the area of the six sides divided by the volume gives a remainder which is 4*a(n). - _J. M. Bergot_, Sep 12 2011
%C The infinite sum over the reciprocals is given by 2*A179119. - _Wolfdieter Lang_, Jul 10 2019
%H Charles R Greathouse IV, <a href="/A034953/b034953.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TriangularNumber.html">Triangular Number</a>.
%F a(n) = A000217(A000040(n)). - _Omar E. Pol_, Jul 27 2009
%F a(n) = Sum_{k=1..prime(n)} k. - _Wesley Ivan Hurt_, Apr 27 2021
%F Product_{n>=1} (1 - 1/a(n)) = A307868. - _Amiram Eldar_, Nov 07 2022
%p a:= n-> (p-> p*(p+1)/2)(ithprime(n)):
%p seq(a(n), n=1..65); # _Alois P. Heinz_, Apr 20 2022
%t t[n_] := n(n + 1)/2; Table[t[Prime[n]], {n, 44}] (* _Robert G. Wilson v_, Aug 12 2004 *)
%t (#(# + 1))/2&/@Prime[Range[50]] (* _Harvey P. Dale_, Feb 27 2012 *)
%t With[{nn=200},Pick[Accumulate[Range[nn]],Table[If[PrimeQ[n],1,0],{n,nn}],1]] (* _Harvey P. Dale_, Mar 05 2023 *)
%o (PARI) forprime(p=2,1e3,print1(binomial(p+1,2)", ")) \\ _Charles R Greathouse IV_, Jul 19 2011
%o (PARI) apply(n->binomial(n+1,2),primes(100)) \\ _Charles R Greathouse IV_, Jun 04 2013
%o (Haskell)
%o a034953 n = a034953_list !! (n-1)
%o a034953_list = map a000217 a000040_list
%o -- _Reinhard Zumkeller_, Sep 23 2011
%Y Cf. A000217, A034954, A034955, A011756, A179119, A195678, A307868.
%Y Cf. A054269, A067076, A082749.
%K nonn,easy
%O 1,1
%A _Patrick De Geest_, Oct 15 1998