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.

A339771 a(n) = Sum_{i=0..n} Sum_{j=0..n} 2^max(i,j).

Original entry on oeis.org

1, 7, 27, 83, 227, 579, 1411, 3331, 7683, 17411, 38915, 86019, 188419, 409603, 884739, 1900547, 4063235, 8650755, 18350083, 38797315, 81788931, 171966467, 360710147, 754974723, 1577058307, 3288334339, 6845104131, 14227079171, 29527900163, 61203283971
Offset: 0

Views

Author

Bernard Schott, Dec 16 2020

Keywords

Examples

			a(3) = 5*2^4 + 3 = 83.
		

References

  • Eric Billault, Walter Damin, Robert Ferréol, Rodolphe Garin, MPSI Classes Prépas - Khôlles de Maths, Exercices corrigés, Ellipses, 2012, exercice 2.22 (2), pp. 26, 43-44.

Crossrefs

Cf. A142964 (with min instead of max).
Partial sums of A014480.

Programs

  • Maple
    seq((2*n-1)*2^(n+1)+3,n=0..40);
  • Mathematica
    Table[(2*n - 1)*2^(n + 1) + 3, {n, 0, 29}] (* Amiram Eldar, Dec 16 2020 *)
  • PARI
    a(n) = sum(i=0, n, sum(j=0, n, 2^max(i,j))); \\ Michel Marcus, Dec 16 2020
    
  • Python
    def A339771():
        a, b, c = 1, 7, 27
        yield(a); yield(b)
        while True:
            yield c
            z = 4*a - 8*b + 5*c
            a, b, c = b, c, z
    a = A339771()
    print([next(a) for  in range(30)]) # _Peter Luschny, Dec 17 2020

Formula

a(n) = (2*n-1) * 2^(n+1) + 3.
G.f.: -(2*x+1)/((x-1)*(2*x-1)^2). - Alois P. Heinz, Dec 16 2020
E.g.f: 3*exp(x) + 2*exp(2*x)*(4*x - 1). - Stefano Spezia, Dec 16 2020
a(n) = 2*A066524(n+1) - A142964(n). - Kevin Ryde, Dec 17 2020
a(n) = (2*A027981(n)+1)/3 for n >= 1. - Hugo Pfoertner, Dec 17 2020