|
|
A014284
|
|
Partial sums of primes, if 1 is regarded as a prime (as it was until quite recently, see A008578).
|
|
40
|
|
|
1, 3, 6, 11, 18, 29, 42, 59, 78, 101, 130, 161, 198, 239, 282, 329, 382, 441, 502, 569, 640, 713, 792, 875, 964, 1061, 1162, 1265, 1372, 1481, 1594, 1721, 1852, 1989, 2128, 2277, 2428, 2585, 2748, 2915, 3088, 3267, 3448, 3639, 3832, 4029
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Lexicographically earliest sequence whose first differences are an increasing sequence of primes. Complement of A175969. - Jaroslav Krizek, Oct 31 2010
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(7) = 42 because the first six primes (2, 3, 5, 7, 11, 13) add up to 41, and 1 + 41 = 42.
|
|
MAPLE
|
end proc:
|
|
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 *)
|
|
PROG
|
(Haskell)
a014284 n = a014284_list !! n
a014284_list = scanl1 (+) a008578_list
(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
|
|
|
|