The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056942 Area of rectangle needed to enclose a non-touching spiral of length n on a square lattice. 3
0, 1, 2, 4, 6, 6, 9, 12, 12, 12, 16, 20, 20, 20, 20, 25, 30, 30, 30, 30, 30, 36, 42, 42, 42, 42, 42, 42, 49, 56, 56, 56, 56, 56, 56, 56, 64, 72, 72, 72, 72, 72, 72, 72, 72, 81, 90, 90, 90, 90, 90, 90, 90, 90, 90, 100, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 121 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
m^2 (when n is m-th triangular number) followed by m copies of m-th pronic [m(m+1)].
LINKS
FORMULA
a(n) = floor[(sqrt(8n+1)-1)/2]*ceiling[(sqrt(8n+1)-1)/2] = A002024(n)*A003056(n) = A056943(n)+n = 2n-A056944(n). If n = t(t+1)/2 then a(n) = t^2; if t(t-1)/2 < n < t(t+1)/2 then a(n) = t(t-1).
EXAMPLE
a(9) = 12 since spiral is as marked by 9 X's in 4*3 = 12 rectangle:
X.XX
X..X
XXXX
MATHEMATICA
ar[n_]:=Module[{c=(Sqrt[8n+1]-1)/2}, Floor[c]Ceiling[c]]; Array[ar, 70, 0] (* Harvey P. Dale, Feb 27 2012 *)
PROG
(Haskell)
a056942 n = a056942_list !! n
a056942_list = concatMap
(\x -> (x ^ 2) : (take x $ repeat (x * (x + 1)))) [0..]
-- Reinhard Zumkeller, Feb 11 2014
CROSSREFS
Sequence in context: A151688 A159276 A359362 * A115947 A247653 A061228
KEYWORD
easy,nice,nonn
AUTHOR
Henry Bottomley, Jul 13 2000
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 18 09:54 EDT 2024. Contains 372620 sequences. (Running on oeis4.)