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.

A323227 a(n) = [x^n] (1 - 2*x + x^2 - 2*x^3 + x^4)/((1 - x)^2*(1 - 2*x)).

Original entry on oeis.org

1, 2, 4, 6, 9, 14, 23, 40, 73, 138, 267, 524, 1037, 2062, 4111, 8208, 16401, 32786, 65555, 131092, 262165, 524310, 1048599, 2097176, 4194329, 8388634, 16777243, 33554460, 67108893, 134217758, 268435487, 536870944, 1073741857, 2147483682, 4294967331, 8589934628
Offset: 0

Views

Author

Peter Luschny, Feb 12 2019

Keywords

Crossrefs

Programs

  • Magma
    [n le 1 select n+1 else 2^(n-2) +(n+1) : n in [0..35]]; // G. C. Greubel, Sep 26 2024
    
  • Maple
    a := proc(n) option remember; if n < 4 then return [1, 2, 4, 6][n + 1] fi;
    ((2 - 2*n)*a(n-2) - (5 - 3*n)*a(n-1))/(n - 2) end: seq(a(n), n=0..35);
  • Mathematica
    A323211[n_, k_] := If[n <= 1, 1, Binomial[n - 2, k - 1] + 1];
    Table[Sum[A323211[n, k], {k, 0, n}], {n, 0, 35}]
  • SageMath
    [2^(n-2) +(n+1) -int(n==0)/4 -int(n==1)/2 for n in range(36)] # G. C. Greubel, Sep 26 2024

Formula

a(n) = Sum_{k=0..n} ( binomial(n - 2, k - 1) + 1 ), if n >= 2.
a(n) = ((2 - 2*n)*a(n-2) - (5 - 3*n)*a(n-1))/(n - 2) for n >= 4.
a(n+1) - (n + 1) = A094373(n) for n >= 0.
a(n+1) - a(n) = 2^n + 1 for n >= 2.
a(n) = A270841(n) = 2^(n-2)+n+1 for n>=2. - R. J. Mathar, Feb 14 2019
E.g.f.: (1/4)*(-(1 + 2*x) + 4*(1+x)*exp(x) + exp(2*x)). - G. C. Greubel, Sep 26 2024