A143293 Partial sums of A002110, the primorial numbers.
1, 3, 9, 39, 249, 2559, 32589, 543099, 10242789, 233335659, 6703028889, 207263519019, 7628001653829, 311878265181039, 13394639596851069, 628284422185342479, 33217442899375387209, 1955977793053588026279, 119244359152460559009549, 7977565910232727614888639
Offset: 0
Keywords
Examples
a(3) = 39 = (1 + 2 + 6 + 30), where A002110 = (1, 2, 6, 30, 210, 2310,...).
Links
- Soumyadeep Dhar, Table of n, a(n) for n = 0..350 (terms up to a(100) from T. D. Noe)
- Index entries for sequences related to primorial base
Programs
-
Maple
b:= proc(n) option remember; `if`(n=0, [1$2], (h-> (p-> [p, p+h[2]])(ithprime(n)*h[1]))(b(n-1))) end: a:= n-> b(n)[2]: seq(a(n), n=0..19); # Alois P. Heinz, Feb 23 2022
-
Mathematica
Table[s = 1; Do[s = 1 + s*Prime[i], {i, n, 1, -1}]; s, {n, 0, 20}] (* T. D. Noe, May 03 2013 *) Accumulate[FoldList[Times,1,Prime[Range[20]]]] (* Harvey P. Dale, Feb 05 2015 *)
-
PARI
a(n)=if(n==0,return(1)); my(P=1,s=1); forprime(p=2,prime(n), s+=P*=p); s \\ Charles R Greathouse IV, Feb 05 2014
-
Python
from itertools import chain, accumulate, count, islice from operator import mul from sympy import prime def A143293_gen(): # generator of terms return accumulate(accumulate(chain((1,),(prime(n) for n in count(1))), mul)) A143293_list = list(islice(A143293_gen(),20)) # Chai Wah Wu, Feb 23 2022
Formula
a(n) = Sum_{k=0..n} prime(k)#, where prime(n)# = A002110(n).
Extensions
a(11)-a(19) from Jonathan Vos Post, Feb 10 2010
Comments