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.

A172471 a(n) = floor(sqrt(2*n)).

Original entry on oeis.org

0, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12
Offset: 0

Views

Author

Vincenzo Librandi, Feb 04 2010

Keywords

Comments

If k is even, k appears k+1 times; if k is odd, k appears k times. - N. J. A. Sloane, Jan 25 2021

Crossrefs

Programs

  • Haskell
    a172471 = a000196 . (* 2)  -- Reinhard Zumkeller, Feb 12 2012
    
  • Magma
    [Floor(Sqrt(2*n)) : n in [0..80]];
    
  • Mathematica
    Table[Floor[Sqrt[2n]],{n,0,80}]
  • PARI
    a(n) = sqrtint(2*n); \\ Michel Marcus, May 23 2025

Formula

a(n) = A000196(2*n). - R. J. Mathar, Jul 06 2010