login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A123855
a(n) = Sum_{j=1..n} Sum_{i=1..n} prime(i)^j.
7
2, 18, 208, 3730, 201092, 7335762, 526460272, 26465563878, 2363769149128, 487833920370774, 40049421223880084, 7972075784185713954, 1235006486302921316794, 124887894202756460238954
OFFSET
1,1
COMMENTS
Primes p that divide a(p-1) are listed in A123856.
Nonprime numbers n that divide a(n-1) are listed in A123857.
It appears that 2^k divides a(2^k-1) for all k > 0 (confirmed for 0 < k < 10).
The summation over j can be carried out first and expressed analytically, leading to the given formula and Maple program. - M. F. Hasler, Nov 09 2006
LINKS
M. F. Hasler, Nov 09 2006, Table of n, a(n) for n = 1..25
FORMULA
a(n) = Sum_{j=1..n} Sum_{i=1..n} prime(i)^j.
a(p) = Sum_{i=1..p} (prime(i)^p - 1)/(prime(i) - 1)*prime(i). - M. F. Hasler, Nov 09 2006
EXAMPLE
a(1) = prime(1)^1 = 2.
a(2) = prime(1)^1 + prime(1)^2 + prime(2)^1 + prime(2)^2 = 2^1 + 2^2 + 3^1 + 3^2 = 18.
MAPLE
A123855 := p-> sum((ithprime(i)^p-1)/(ithprime(i)-1)*ithprime(i), i = 1 .. p); map(%, [$1..20]); # M. F. Hasler, Nov 09 2006
MATHEMATICA
Table[Sum[Sum[Prime[i]^j, {i, 1, n}], {j, 1, n}], {n, 1, 20}]
PROG
(PARI) vector(20, n, sum(i=1, n, sum(j=1, n, prime(i)^j )) ) \\ G. C. Greubel, Aug 08 2019
(Magma) [(&+[ (&+[ NthPrime(i)^j: j in [1..n]]): i in [1..n]]): n in [1..20]]; // G. C. Greubel, Aug 08 2019
(Sage) [sum(sum( nth_prime(i)^j for j in (1..n)) for i in (1..n)) for n in (1..20)] # G. C. Greubel, Aug 08 2019
CROSSREFS
Cf. A086787 (Sum_{i=1..n} Sum_{j=1..n} i^j).
Sequence in context: A224881 A369921 A092882 * A121407 A369027 A153647
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Oct 13 2006
STATUS
approved