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.

A341240 a(n) = 4*a(n-1) - 2*a(n-2) + a(n-3) - 4*a(n-4) + 2*a(n-5) for n >= 7, where a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 12, a(5) = 38, a(6) = 127.

Original entry on oeis.org

1, 2, 4, 12, 38, 127, 432, 1472, 5023, 17148, 58544, 199879, 682428, 2329952, 7954951, 27159900, 92729696, 316598983, 1080936540, 3690548192, 12600319687, 43020182364, 146880090080, 501479995591, 1712159802204, 5845679217632, 19958397266119, 68142230629212
Offset: 1

Views

Author

Clark Kimberling, Feb 07 2021

Keywords

Crossrefs

Programs

  • Mathematica
    z = 50; r = 1 + Sqrt[2]; s = Sqrt[2]; f[x_] := Floor[r*Floor[s*x]];
    Table[f[n], {n, 1, z}] (* A341239 *)
    a[1] = 1; a[n_] := f[a[n - 1]];
    Table[a[n], {n, 1, z}] (* A341240 *)
    LinearRecurrence[{4,-2,1,-4,2},{1,2,4,12,38,127},30] (* Harvey P. Dale, Jun 14 2022 *)

Formula

Let f(n) = floor(r*floor(s*n)) = A184922(n), where r = 1 + sqrt(2) and s = sqrt(2). Let a(1) = 1. Then a(n) = f(a(n-1)) for n >= 2.
G.f.: x*(1 - 2*x - 2*x^2 - x^3 + x^5)/(1 - 4*x + 2*x^2 - x^3 + 4*x^4 - 2*x^5). - Stefano Spezia, Feb 11 2021