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
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Oct 13 2006
STATUS
approved