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.

A027412 a(n) = 2*a(n-1) + (n-2)*a(n-2) with a(0) = 1, a(1) = 2.

Original entry on oeis.org

1, 2, 4, 10, 28, 86, 284, 998, 3700, 14386, 58372, 246218, 1076156, 4860710, 22635292, 108459814, 533813716, 2694524642, 13930068740, 73667056394, 398075350108, 2195824771702, 12353156545564, 70818633296870
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A005425.

Programs

  • Magma
    [n le 2 select n else 2*Self(n-1) + (n-3)*Self(n-2): n in [1..40]]; // G. C. Greubel, Apr 01 2023
    
  • Mathematica
    RecurrenceTable[{a[0]==1, a[1]==2, a[n]==2 a[n-1] + (n-2) a[n-2]}, a,{ n, 40}] (* Vincenzo Librandi, Dec 29 2012 *)
    Table[If[n==0, 1, 2*(-I/Sqrt[2])^(n-1)*HermiteH[n-1, I*Sqrt[2]]], {n, 0, 40}] (* G. C. Greubel, Apr 01 2023 *)
  • SageMath
    [1]+[2*(-i/sqrt(2))^(n-1)*hermite(n-1, i*sqrt(2)) for n in range(1,41)] # G. C. Greubel, Apr 01 2023

Formula

a(n) = 2 * A005425(n-1), n > 0.
a(n) ~ sqrt(2)*exp(2*sqrt(n)-n/2-1)*n^(n/2-1/2). - Vaclav Kotesovec, Oct 08 2012