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.

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)

A083215 a(n) = 1 + Sum(prime(i)*(2*i-1): 1<=i<=n).

Original entry on oeis.org

3, 12, 37, 86, 185, 328, 549, 834, 1225, 1776, 2427, 3278, 4303, 5464, 6827, 8470, 10417, 12552, 15031, 17800, 20793, 24190, 27925, 32108, 36861, 42012, 47471, 53356, 59569, 66236, 73983, 82236, 91141, 100454, 110735, 121456, 132917
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 01 2003

Keywords

Crossrefs

Cf. A002412.
Equals 1 + A316322(n).

Programs

  • Mathematica
    nxt[{n_, a_}] := {n + 1, a + Prime[n + 1] (2 n + 1)}; NestList[nxt,{1,2},50][[All,2]]+1 (* Harvey P. Dale, Jul 05 2018 *)
  • PARI
    a(n) = 1 + sum(i=1, n, prime(i)*(2*i-1)); \\ Michel Marcus, Jan 22 2022

Extensions

Definition corrected by Harvey P. Dale, Jul 03 2018

A308731 a(n) is the sum of the terms of the symmetric square array defined by M(i,j) = prime(i)+i-j for i >= j and M(i,j) = M(j,i) if i < j.

Original entry on oeis.org

2, 13, 44, 105, 224, 397, 660, 1001, 1464, 2105, 2866, 3849, 5030, 6373, 7946, 9829, 12048, 14489, 17310, 20459, 23872, 27731, 31972, 36707, 42060, 47861, 54022, 60663, 67688, 75225, 83902, 93147, 103108, 113543, 125014, 136995, 149788, 163419, 177760, 192987, 209126, 225871, 243912, 262595, 282108
Offset: 1

Views

Author

Ali Sada, Jun 20 2019

Keywords

Examples

			For n=1, the array is 2, and the sum is 2.
.
.                     2  4
For n=2, the array is      and the sum is 13.
.                     4  3
.
.                     2  4  7
For n=3, the array is 4  3  6 and the sum is 44.
                      7  6  5
		

Crossrefs

Cf. A000040, A007290 (partial sums of n(n-1)), A316322 (sum of "pile of primes").

Programs

  • PARI
    M(i,j) = if (i>=j, prime(i)+i-j, M(j,i));
    a(n) = sum(i=1, n, vecsum(vector(n, k, M(i,k)))); \\ Michel Marcus, Jun 21 2019
    
  • PARI
    A308731_first(N)=vector(N, n, N+=if(n>1, prime(n)*(2*n-1)+n*(n-1), 2-N)) \\ This is a more efficient way to compute the list [a(1), ..., a(N)]
    apply( {A308731(n)=sum(k=1,n,prime(k)*(2*k-1))+2*binomial(n+1,3)}, [1..20]) \\ M. F. Hasler, May 08 2025

Formula

a(n) = a(n-1) + (2n-1)*prime(n) + n*(n-1). - Charlie Neder, Jun 21 2019
a(n) = A316322(n) + A007290(n+1). - M. F. Hasler, May 08 2025

Extensions

Edited by Michel Marcus, Jun 21 2019
Showing 1-3 of 3 results.