OFFSET
1,2
COMMENTS
Lexicographically earliest sequence whose first differences are an increasing sequence of primes. Complement of A175969. - Jaroslav Krizek, Oct 31 2010
Partial sums of noncomposite numbers (A008578). - Omar E. Pol, Aug 09 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{k <= n} [(A158611(k + 1)) * (A000012(n - k + 1))] = Sum_{k <= n} [(A158611(k + 1)) * (A000012(k))] = Sum_{k <= n} [(A008578(k)) * (A000012(n - k + 1))] = Sum_{k <= n} [(A008578(k)) * (A000012(k))] for n, k >= 1. - Jaroslav Krizek, Aug 05 2009
a(n + 1) = A007504(n) + 1. a(n + 1) - a(n) = A000040(n) = n-th primes. - Jaroslav Krizek, Aug 19 2009
a(n) = a(n-1) + prime(n-1), with a(1)=1. - Vincenzo Librandi, Jul 27 2013
G.f: (x*(1+b(x)))/(1-x) = c(x)/(1-x), where b(x) and c(x) are respectively the g.f. of A000040 and A008578. - Mario C. Enriquez, Dec 10 2016
EXAMPLE
a(7) = 42 because the first six primes (2, 3, 5, 7, 11, 13) add up to 41, and 1 + 41 = 42.
MAPLE
A014284 := proc(n)
add(A008578(i), i=1..n) ;
end proc:
seq(A014284(n), n=1..60) ; # R. J. Mathar, Mar 05 2017
MATHEMATICA
Join[{1}, Table[1+Sum[Prime[j], {j, 1, n}], {n, 1, 50}]] (* Vladimir Joseph Stephan Orlovsky, Sep 25 2009, modified by G. C. Greubel, Jun 18 2019 *)
Accumulate[Join[{1}, Prime[Range[45]]]] (* Alonso del Arte, Oct 09 2012 *)
PROG
(Haskell)
a014284 n = a014284_list !! n
a014284_list = scanl1 (+) a008578_list
-- Reinhard Zumkeller, Mar 26 2015
(PARI) concat([1], vector(50, n, 1 + sum(j=1, n, prime(j)) )) \\ G. C. Greubel, Jun 18 2019
(Magma) [1] cat [1 + (&+[NthPrime(j): j in [1..n]]): n in [1..50]]; // G. C. Greubel, Jun 18 2019
(Sage) [1]+[1 + sum(nth_prime(j) for j in (1..n)) for n in (1..50)] # G. C. Greubel, Jun 18 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Deepan Majmudar (dmajmuda(AT)esq.com)
EXTENSIONS
STATUS
approved