login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A137928 The even principal diagonal of a 2n X 2n spiral. 14
2, 4, 10, 16, 26, 36, 50, 64, 82, 100, 122, 144, 170, 196, 226, 256, 290, 324, 362, 400, 442, 484, 530, 576, 626, 676, 730, 784, 842, 900, 962, 1024, 1090, 1156, 1226, 1296, 1370, 1444, 1522, 1600, 1682, 1764, 1850, 1936, 2026, 2116, 2210, 2304, 2402, 2500, 2602, 2704, 2810 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

2n X 2n spirals of the form:

(Example of n = 2)

7...8...9...10

6...1...2...11

5...4...3...12

16..15..14..13

a(n) = A171218(n) - A171218(n-1). - Reinhard Zumkeller, Dec 05 2009

LINKS

Table of n, a(n) for n=1..53.

Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1)

FORMULA

a(n) = 2*n + 4*floor((n-1)^2/4) = 2*n + 4*A002620(n-1).

From R. J. Mathar, Jun 27 2011: (Start)

G.f.: 2*x*(1 + x^2) / ( (1 + x)*(1 - x)^3 ).

a(n) = 2*A000982(n). (End)

a(n+1) = (3 + 4*n + 2*n^2 + (-1)^n)/2 = A080335(n) + (-1)^n. - Philippe Deléham, Feb 17 2012

a(n) = 2 * ceiling(n^2/2). - Wesley Ivan Hurt, Jun 15 2013

a(n) = n^2 + (n mod 2). - Bruno Berselli, Oct 03 2017

EXAMPLE

a(1) = 2(1) + 4*floor((1-1)/4) = 2;

a(2) = 2(2) + 4*floor((2-1)/4) = 4.

MAPLE

A137928:=n->2*ceil(n^2/2): seq(A137928(n), n=1..100); # Wesley Ivan Hurt, Jul 25 2017

MATHEMATICA

LinearRecurrence[{2, 0, -2, 1}, {2, 4, 10, 16}, 60] (* Harvey P. Dale, Aug 28 2017 *)

PROG

(Python) a = lambda n: 2*n + 4*floor((n-1)**2/4)

(PARI) a(n)=2*n+(n-1)^2\4*4 \\ Charles R Greathouse IV, May 21 2015

CROSSREFS

Cf. A000982, A002061 (odd diagonal), A002620, A080335, A171218.

Sequence in context: A189558 A111149 A123689 * A293154 A144834 A006584

Adjacent sequences:  A137925 A137926 A137927 * A137929 A137930 A137931

KEYWORD

nonn,easy

AUTHOR

William A. Tedeschi, Feb 29 2008

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified February 25 22:13 EST 2018. Contains 299661 sequences. (Running on oeis4.)