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.

Showing 1-3 of 3 results.

A316322 Sum of piles of first n primes: a(n) = Sum(prime(i)*(2*i-1): 1<=i<=n).

Original entry on oeis.org

2, 11, 36, 85, 184, 327, 548, 833, 1224, 1775, 2426, 3277, 4302, 5463, 6826, 8469, 10416, 12551, 15030, 17799, 20792, 24189, 27924, 32107, 36860, 42011, 47470, 53355, 59568, 66235, 73982, 82235, 91140, 100453, 110734, 121455, 132916, 145141, 158000, 171667, 186166, 201189, 217424, 234215, 251748
Offset: 1

Views

Author

N. J. A. Sloane, Jul 03 2018, based on Reinhard Zumkeller's A083215

Keywords

Examples

			............................................ 7
........................... 5 ............ 7 5 7
............ 3 .......... 5 3 5 ........ 7 5 3 5 7
2 ........ 3 2 3 ...... 5 3 2 3 5 .... 7 5 3 2 3 5 7
a(1)=2 ... a(2)=11 .... a(3)=36 ...... a(4)=85.
		

Crossrefs

Programs

  • Maple
    seq(add((2*i-1)*ithprime(i),i=1..n), n=1..80); # Ridouane Oudra, Feb 19 2025
  • Mathematica
    nxt[{n_, a_}] := {n + 1, a + Prime[n + 1] (2 n + 1)}; NestList[nxt,{1,2},50][[All,2]] (* Harvey P. Dale, Jul 05 2018 *)
  • PARI
    a(n) = sum(i=1, n, prime(i)*(2*i-1)); \\ Michel Marcus, Jan 22 2022

Formula

From Ridouane Oudra, Feb 19 2025: (Start)
a(n) = Sum_{i=1..n} Sum_{j=1..n} max(prime(i), prime(j)).
a(n) = 2*A014285(n) - A007504(n).
a(n) = 2*A167214(n) - A023662(n).
a(n) = A167214(n) + A062020(n). (End)

A023662 Convolution of odd numbers and primes.

Original entry on oeis.org

2, 9, 24, 51, 96, 165, 264, 399, 576, 805, 1094, 1451, 1886, 2405, 3014, 3723, 4544, 5485, 6554, 7761, 9112, 10615, 12280, 14117, 16140, 18361, 20786, 23421, 26272, 29345, 32658, 36229, 40068, 44183, 48586, 53289, 58300, 63631, 69292
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000040, A005408, A061802 (first differences).

Programs

  • Maple
    A023662 := proc(n)
        add( ithprime(n-i)*(2*i+1),i=0..n-1) ;
    end proc: # R. J. Mathar, Nov 29 2015
  • Mathematica
    Table[Sum[Prime[n - k + 1] (2 k - 1), {k, n}], {n, 39}] (* Michael De Vlieger, Nov 29 2015 *)
  • PARI
    a(n) = sum(i=1, n, prime(n-i+1)*(2*i-1)); \\ Michel Marcus, Sep 30 2013

Formula

a(n) = Sum_{i=0..n-1} A000040(n-i)*A005408(i). - R. J. Mathar, Nov 29 2015
a(n) = Sum_{i=0..n-1} A061802(i). - Marco Zárate, Jun 09 2024
From Ridouane Oudra, Feb 19 2025: (Start)
a(n) = Sum_{i=1..n} Sum_{j=1..n} min(prime(i), prime(j)).
a(n) = A167214(n) - A062020(n).
a(n) = 2*A167214(n) - A316322(n).
a(n) = A014148(n) + A014148(n-1).
a(n) = A007504(n) + 2*A014148(n-1). (End)

A177082 a(n) = 2*n*A071148(n).

Original entry on oeis.org

6, 32, 90, 208, 390, 672, 1050, 1568, 2286, 3160, 4290, 5664, 7254, 9128, 11370, 14016, 16966, 20376, 24206, 28400, 33138, 38368, 44206, 50784, 57950, 65624, 73926, 82768, 92278, 103080, 114638, 127104, 140250, 154632, 169750, 185904, 203130, 221312, 240630
Offset: 1

Views

Author

Giacomo Fecondo, Dec 09 2010

Keywords

Comments

a(n) is the sum of all elements of the n X n matrix M(i,j) = prime(i+1)+prime(j+1).
[For n<= 23, only five matrices (with n=1, n=2, n=3, n=5 and n=7) contain all the even numbers starting from 6 and ending with 2*prime(n+1), the maximum element. If the prime gap prime(n+1)-prime(n) is larger than 2, the even term 2*prime(n+1)-2 is missing in the matrix; the difference equal 2 between prime(n) and prime(n-1) is not a sufficient condition to have a complete set of even numbers in the range 6 .. 2*prime(n+1) in the matrix.]

Crossrefs

Programs

  • PARI
    seq(n)={2*Vec(deriv((Ser(primes(n+1))-2)/(1-x)))} \\ Andrew Howroyd, Jan 14 2020
  • Sage
    A177082 = lambda n: 2*n*(sum(primes_first_n(n+1))-2) # D. S. McNeil, Dec 18 2010
    

Extensions

Terms a(25) and beyond from Andrew Howroyd, Jan 14 2020
Showing 1-3 of 3 results.