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.

A078633 Smallest number of sticks of length 1 needed to construct n squares with sides of length 1.

Original entry on oeis.org

4, 7, 10, 12, 15, 17, 20, 22, 24, 27, 29, 31, 34, 36, 38, 40, 43, 45, 47, 49, 52, 54, 56, 58, 60, 63, 65, 67, 69, 71, 74, 76, 78, 80, 82, 84, 87, 89, 91, 93, 95, 97, 100, 102, 104, 106, 108, 110, 112, 115, 117, 119, 121, 123, 125, 127, 130, 132, 134, 136, 138, 140, 142
Offset: 1

Views

Author

Mambetov Timur and Takenov Nurdin (timur_teufel(AT)mail.ru), Dec 12 2002

Keywords

Comments

A182834(a(n)) mod 2 = 0, or, where even terms occur in A182834. - Reinhard Zumkeller, Aug 05 2014

Examples

			a(2)=7 because we have following construction:
   _ _
  |_|_|
		

Crossrefs

Programs

  • Haskell
    a078633 n = 2 * n + ceiling (2 * sqrt (fromIntegral n))
    -- Reinhard Zumkeller, Aug 05 2014
    
  • Mathematica
    Table[2n+Ceiling[2Sqrt[n]],{n,70}] (* Harvey P. Dale, Jun 20 2011 *)
  • PARI
    a(n) = 2*n + ceil(2*sqrt(n)); \\ Michel Marcus, Mar 26 2018
    
  • Python
    from math import isqrt
    def A078633(n): return (m:=n<<1)+1+isqrt((m<<1)-1) # Chai Wah Wu, Jul 28 2022

Formula

a(n) = 2*n + ceiling(2*sqrt(n)) = 2*n + A027434(n).
a(n) = (4*n + A027709(n))/2. - Tanya Khovanova, Mar 07 2008