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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002939 a(n) = 2*n*(2*n-1). 74

%I

%S 0,2,12,30,56,90,132,182,240,306,380,462,552,650,756,870,992,1122,

%T 1260,1406,1560,1722,1892,2070,2256,2450,2652,2862,3080,3306,3540,

%U 3782,4032,4290,4556,4830,5112,5402,5700,6006,6320,6642,6972,7310,7656,8010,8372

%N a(n) = 2*n*(2*n-1).

%C Write 0,1,2,... in a spiral; sequence gives numbers on one of 4 diagonals (see Example section).

%C For n>1 this is the Engel expansion of cosh(1), A118239. - _Benoit Cloitre_, Mar 03 2002

%C a(n) = A125199(n,n) for n>0. - _Reinhard Zumkeller_, Nov 24 2006

%C Central terms of the triangle in A195437: a(n+1) = A195437(2*n,n). - _Reinhard Zumkeller_, Nov 23 2011

%C For n>2, the terms represent the sums of those primitive Pythagorean triples with hypotenuse (H) one unit longer than the longest side (L), or H = L + 1. - _Richard R. Forberg_, Jun 09 2015

%C For n>1, a(n) is the perimeter of a Pythagorean triangle with an odd leg 2*n-1. - _Agola Kisira Odero_, Apr 26 2016

%D R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd ed., 1994, p. 99.

%H Vincenzo Librandi, <a href="/A002939/b002939.txt">Table of n, a(n) for n = 0..10000</a>

%H A. M. Nemirovsky et al., <a href="http://dx.doi.org/10.1007/BF01049010">Marriage of exact enumeration and 1/d expansion methods: lattice model of dilute polymers</a>, J. Statist. Phys., 67 (1992), 1083-1108.

%H R. Tijdeman, <a href="http://www.math.leidenuniv.nl/~tijdeman/tij1.ps">Some applications of Diophantine approximation</a>, pp. 261-284 of Surveys in Number Theory (Urbana, May 21, 2000), ed. M. A. Bennett et al., Peters, 2003.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).

%F Sum_{n >= 1} 1/a(n) = log(2) (cf. Tijdeman).

%F Log(2) = Sum_{n >= 1} ((1 - 1/2) + (1/3 - 1/4) + (1/5 - 1/6) + (1/7 - 1/8) + ...) = Sum_{n >= 0} (-1)^n/(n+1). Log(2) = Integral_{x=0..1} 1/(1+x) dx. - _Gary W. Adamson_, Jun 22 2003

%F a(n) = A000384(n)*2. - _Omar E. Pol_, May 14 2008

%F From _R. J. Mathar_, Apr 23 2009: (Start)

%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).

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

%F a(n) = a(n-1) + 8*n - 6 (with a(0)=0). - _Vincenzo Librandi_, Nov 12 2010

%F a(n) = A118729(8n+1). - _Philippe Deléham_, Mar 26 2013

%F Product_{k=1..n} a(k) = (2n)!. - _Tony Foster III_, Sep 06 2015

%F E.g.f.: 2*x*(1 + 2*x)*exp(x). - _Ilya Gutkovskiy_, Apr 29 2016

%F a(n) = A002943(-n) for all n in Z. - _Michael Somos_, Jan 28 2017

%F 0 = 12 + a(n)*(-8 + a(n) - 2*a(n+1)) + a(n+1)*(-8 + a(n+1)) for all n in Z. - _Michael Somos_, Jan 28 2017

%e G.f. = 2*x + 12*x^2 + 30*x^3 + 56*x^4 + 90*x^5 + 132*x^6 + 182*x^7 + 240*x^8 + ...

%e On a square lattice, place the nonnegative integers at lattice points forming a spiral as follows: place "0" at the origin; then move one step in any of the four cardinal directions and place "1" at the lattice point reached; then turn 90 degrees in either direction and place a "2" at the next lattice point; then make another 90-degree turn in the same direction and place a "3" at the lattice point; etc. The terms of the sequence will lie along one of the diagonals, as seen in the example below:

%e 99 64--65--66--67--68--69--70--71--72

%e | | |

%e 98 63 36--37--38--39--40--41--42 73

%e | | | | |

%e 97 62 35 16--17--18--19--20 43 74

%e | | | | | | |

%e 96 61 34 15 4---5---6 21 44 75

%e | | | | | | | | |

%e 95 60 33 14 3 *0* 7 22 45 76

%e | | | | | | | | | |

%e 94 59 32 13 *2*--1 8 23 46 77

%e | | | | | | | |

%e 93 58 31 *12*-11--10---9 24 47 78

%e | | | | | |

%e 92 57 *30*-29--28--27--26--25 48 79

%e | | | |

%e 91 *56*-55--54--53--52--51--50--49 80

%e | |

%e *90*-89--88--87--86--85--84--83--82--81

%e [Edited by _Jon E. Schoenfield_, Jan 01 2017]

%p A002939:=n->2*n*(2*n-1): seq(A002939(n), n=0..100); # _Wesley Ivan Hurt_, Jan 28 2017

%t Table[2*n*(2*n-1), {n, 0, 50}] (* _Vladimir Joseph Stephan Orlovsky_, Oct 25 2008 *)

%t 2#(2#-1)&/@Range[0,50] (* _Harvey P. Dale_, Mar 06 2011 *)

%o (PARI) a(n)=2*binomial(2*n,2) \\ _Charles R Greathouse IV_, Jul 25 2011

%o (MAGMA) [2*n*(2*n-1): n in [0..50]]; // _Vincenzo Librandi_, Jul 26 2011

%o (Haskell)

%o a002939 n = (* 2) . a000384

%o a002939_list = scanl1 (+) a017089_list

%o -- _Reinhard Zumkeller_, Jun 08 2015

%o (Python) a=lambda n: 2*n*(2*n-1) # _Indranil Ghosh_, Jan 01 2017

%Y Sequences from spirals: A001107, A002939, A007742, A033951-A033953, A033954, A033989-A033991, A002943, A033996, A033988.

%Y Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.

%Y Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.

%Y Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.

%Y Cf. A016789, A017041, A017485, A125202.

%Y Cf. numbers of the form n*(n*k-k+4))/2 listed in A226488 (this sequence is the case k=8). - _Bruno Berselli_, Jun 10 2013

%Y Cf. A017089 (first differences).

%K nonn,nice,easy

%O 0,2

%A _N. J. A. Sloane_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 21 04:40 EDT 2019. Contains 325189 sequences. (Running on oeis4.)