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.

A140978 Repeat (n+1)^2 n times.

Original entry on oeis.org

4, 9, 9, 16, 16, 16, 25, 25, 25, 25, 36, 36, 36, 36, 36, 49, 49, 49, 49, 49, 49, 64, 64, 64, 64, 64, 64, 64, 81, 81, 81, 81, 81, 81, 81, 81, 100, 100, 100, 100, 100, 100, 100, 100, 100, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121
Offset: 1

Views

Author

Paul Curtz, Aug 17 2008

Keywords

Comments

See A093995.
Frenicle writes the entries in the form a(n) = A055096(n)-A133819(n), with the flattened index view of A133819: 4=5-1, 9=10-1, 9=13-4, 16=17-1, 16=20-4, 16=25-9 etc.
Also triangle T(n, k) = (n+1)^2, 1<=k<=n. - Michel Marcus, Feb 03 2013

Crossrefs

Cf. A000290.

Programs

  • Haskell
    a140978 n k = a140978_tabl !! (n-1) !! (k-1)
    a140978_row n = a140978_tabl !! (n-1)
    a140978_tabl = map snd $ iterate
                   (\(i, xs@(x:_)) -> (i + 2, map (+ i) (x:xs))) (5, [4])
    -- Reinhard Zumkeller, Mar 23 2013
    
  • Mathematica
    Table[PadRight[{},n,(n+1)^2],{n,10}]//Flatten (* Harvey P. Dale, Oct 10 2019 *)
  • Python
    from math import isqrt
    def A140978(n): return ((m:=isqrt(k:=n<<1))+(k>m*(m+1))+1)**2 # Chai Wah Wu, Nov 07 2024

Formula

a(n)=(A003057(n+1))^2. - R. J. Mathar, Aug 25 2008