cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A123855 a(n) = Sum_{j=1..n} Sum_{i=1..n} prime(i)^j.

Original entry on oeis.org

2, 18, 208, 3730, 201092, 7335762, 526460272, 26465563878, 2363769149128, 487833920370774, 40049421223880084, 7972075784185713954, 1235006486302921316794, 124887894202756460238954
Offset: 1

Views

Author

Alexander Adamchuk, Oct 13 2006

Keywords

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

Examples

			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.
		

Crossrefs

Cf. A086787 (Sum_{i=1..n} Sum_{j=1..n} i^j).

Programs

  • Magma
    [(&+[ (&+[ NthPrime(i)^j: j in [1..n]]): i in [1..n]]): n in [1..20]]; // G. C. Greubel, Aug 08 2019
    
  • 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}]
  • PARI
    vector(20, n, sum(i=1,n, sum(j=1,n, prime(i)^j )) ) \\ 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

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