A060389 a(1)=p_1, a(2)=p_1 + p_1*p_2, a(3)=p_1 + p_1*p_2 + p_1*p_2*p_3, ... where p_i is the i-th prime.
2, 8, 38, 248, 2558, 32588, 543098, 10242788, 233335658, 6703028888, 207263519018, 7628001653828, 311878265181038, 13394639596851068, 628284422185342478, 33217442899375387208, 1955977793053588026278
Offset: 1
Keywords
Examples
a(4) = 248 because p_1 + p_1*p_2 + p_1*p_2*p_3 + p_1*p_2*p_3*p_4 = 2 + 6 + 30 + 210 = 248. a(5) = 2558: A002110(3) = 30, A286624(4) = 85, a(2) = 8; 30*85 + 8 = 2558. - _Bob Selcoe_, Oct 12 2017
Links
Crossrefs
Programs
-
Maple
for n from 1 to 30 do printf(`%d,`,sum(product(ithprime(i), i=1..j), j=1..n)) od:
-
Mathematica
Accumulate[Denominator[Accumulate[1/Prime[Range[20]]]]] (* Alonso del Arte, Mar 21 2013 *) Accumulate@ FoldList[Times, Prime@ Range@ 17] (* Michael De Vlieger, May 04 2017 *)
-
PARI
a(n)=my(s,P=1); forprime(p=2,prime(n),s+=P*=p); s \\ Charles R Greathouse IV, Feb 05 2014
Formula
Extensions
More terms from James Sellers, Apr 05 2001
Comments