Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A114254
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A114254 Sum of all terms on the two principal diagonals of a 2n+1 X 2n+1 ssquare spiral. +0
2
1, 25, 101, 261, 537, 961, 1565, 2381, 3441, 4777, 6421, 8405, 10761, 13521, 16717, 20381, 24545, 29241, 34501, 40357, 46841, 53985, 61821, 70381, 79697, 89801, 100725, 112501, 125161, 138737, 153261, 168765, 185281, 202841, 221477, 241221 (list; graph; listen)
OFFSET

0,2

COMMENT

The 3 X 3 and 5 X 5 spirals are

7 8 9

6 1 2

5 4 3

and

21..22..23..24..25

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

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

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

17..16..15..14..13

FORMULA

O.g.f.: 3/(-1+x)+16/(-1+x)^2+44/(-1+x)^3+32/(-1+x)^4 = (1+21*x+7*x^2+3*x^3)/(-1+x)^4 . - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Feb 10 2008

a(n) = 1 + 10*n^2 + [(16n^3 + 26n)/3]. [Corrected by Arie Groeneveld (bradypus(at)xs4all.nl), Aug 17 2008]

PROGRAM

Python:

.l = input("Length of Diagonal? ")

.Sigma = 1 + 4*sum(4*k**2+k+3-2*((k+2)%(k+1)) for k in range(1, l+1))

.print Sigma

CROSSREFS

Cf. A016754, A054569, A053755, A054554 for diagonals from origin.

Cf. A011655.

Sequence in context: A134422 A016850 A042220 this_sequence A042222 A158551 A044276

Adjacent sequences: A114251 A114252 A114253 this_sequence A114255 A114256 A114257

KEYWORD

easy,nonn

AUTHOR

William A. Tedeschi (fynmun(AT)hotmail.com), Feb 06 2008, Mar 01 2008

page 1

Search completed in 0.004 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research