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.

A100451 a(n) = 0 for n <= 2; for n >= 3, a(n) = (n-2)*floor((n^2-2)/(n-2)).

Original entry on oeis.org

0, 0, 7, 14, 21, 32, 45, 60, 77, 96, 117, 140, 165, 192, 221, 252, 285, 320, 357, 396, 437, 480, 525, 572, 621, 672, 725, 780, 837, 896, 957, 1020, 1085, 1152, 1221, 1292, 1365, 1440, 1517, 1596, 1677, 1760, 1845, 1932, 2021, 2112, 2205, 2300, 2397, 2496, 2597, 2700
Offset: 1

Views

Author

N. J. A. Sloane, Nov 22 2004

Keywords

Crossrefs

Third row of array in A100452.
Cf. A028347.

Programs

  • Magma
    [0, 0] cat [(n-2)*Floor((n^2-2)/(n-2)): n in [3..30]]; // Vincenzo Librandi, Oct 04 2011
    
  • Mathematica
    Join[{0,0,7,14},Table[(n-2)(n+2),{n,5,60}]] (* or *) Join[{0,0,7,14}, LinearRecurrence[{3,-3,1},{21,32,45},60]] (* Harvey P. Dale, Oct 03 2011 *)
  • PARI
    a(n)=if(n<3,0,(n^2-2)\(n-2)*(n-2)) \\ Charles R Greathouse IV, Oct 16 2015
    
  • SageMath
    def A100451(n):
        return 7 * (n - 2) * ((n - 1) // 2) if n < 5 else (n - 2) * (n + 2)
    print([A100451(n) for n in range(1, 61)])  # G. C. Greubel, Apr 07 2023

Formula

a(n) = (n-2)*(n+2), n >= 5. - R. J. Mathar, Aug 17 2009
a(n) = A028347(n), n >= 5. - R. J. Mathar, Jul 31 2010

Extensions

Factor in definition corrected by R. J. Mathar, Aug 17 2009