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.

A340266 The number of degrees of freedom in a quadrilateral cell for a serendipity finite element space of order n.

Original entry on oeis.org

4, 8, 12, 17, 23, 30, 38, 47, 57, 68, 80, 93, 107, 122, 138, 155, 173, 192, 212, 233, 255, 278, 302, 327, 353, 380, 408, 437, 467, 498, 530, 563, 597, 632, 668, 705, 743, 782, 822, 863, 905, 948, 992, 1037, 1083, 1130, 1178, 1227, 1277
Offset: 1

Views

Author

Matthew Scroggs, Jan 02 2021

Keywords

Programs

  • Mathematica
    A340266[n_] := Module[{a}, a[1] = 4; a[i_] := a[i] = i*(i + 3)/2 + 3; a[n]]; Table[A340266[n], {n, 1, 49}] (* Robert P. P. McKone, Jan 29 2021 *)
    LinearRecurrence[{3,-3,1},{4,8,12,17},50] (* Harvey P. Dale, Oct 24 2021 *)
  • PARI
    a(n) = if (n==1, 4, n*(n+3)/2 + 3); \\ Michel Marcus, Jan 04 2021
  • Python
    print([4 if n == 1 else n  * (n + 3) // 2 + 3 for n in range(1, 50)])
    

Formula

a(1) = 4, a(n) = n*(n+3)/2 + 3 (if n > 1).
From Stefano Spezia, Jan 02 2021: (Start)
G.f.: x*(4 - 4*x + x^3)/(1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4. (End)
a(n) = (A111802(n+2)+1)/2 + 2. - Hugo Pfoertner, Jan 02 2021