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!)
A178218 Numbers of the form 2k^2-2k+1 or 2k^2-1. 18

%I #59 Feb 22 2024 20:23:59

%S 1,5,7,13,17,25,31,41,49,61,71,85,97,113,127,145,161,181,199,221,241,

%T 265,287,313,337,365,391,421,449,481,511,545,577,613,647,685,721,761,

%U 799,841,881,925,967,1013,1057,1105,1151,1201,1249

%N Numbers of the form 2k^2-2k+1 or 2k^2-1.

%C Numbers which when squared are used as entries in magic squares. A sequence of numbers whose difference is an interleaved array consisting of 4,6,8,10,12,... and a second sequence 2,4,6,8,10,... . Each entry when squared produces an entry into a tuple used as the right diagonal in a magic square. The difference between square entries produces a third sequence 24,24,120,120,336,336,720,720,1320,1320,..., numbers divisible by 24 and generating the sequence of natural number squares.

%H Bruno Berselli, <a href="/A178218/b178218.txt">Table of n, a(n) for n = 1..1000</a>

%H T. C. Brown, A. R. Freedman, and P. JS. Shiue, <a href="http://ajc.maths.uq.edu.au/pdf/27/ajc_v27_p187.pdf">Progressions of squares</a>, The Australasian Journal of Combinatorics, Volume 27 (2003), p.187.

%H Eddie Gutierrez, <a href="http://www.oddwheel.com/square_sequence.html">New Sequence of Squares</a>

%H Eddie Gutierrez, <a href="http://www.oddwheel.com/square_sequencesVII.html">The Generation of New Sequences (Part G)</a>

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

%F From _Colin Barker_, Apr 04 2012: (Start)

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

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

%F a(n) = (2n(n+2)+3(-1)^n+1)/4. - _Bruno Berselli_, Apr 04 2012

%F From _Philippe Deléham_, Jun 08 2012: (Start)

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

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

%F a(1)=1, a(n) = n*(n+1) - a(n-1). - _Alex Ratushnyak_, Aug 03 2012

%F E.g.f.: ((x^2 + 3*x + 2)*cosh(x) + (x^2 + 3*x - 1)*sinh(x) - 2)/2. - _Stefano Spezia_, Feb 22 2024

%t Join[{1}, Flatten[Table[{(n^2 + 1)/2, (n^2 + 2 n - 1)/2}, {n, 3, 50, 2}]]]

%t Table[(2 n (n + 2) + 3 (-1)^n + 1)/4, {n, 49}] (* _Bruno Berselli_, Apr 04 2012 *)

%t CoefficientList[Series[(1+3*x-3*x^2+x^3)/((1-x)^3*(1+x)),{x,0,60}],x] (* _Vincenzo Librandi_, Jun 09 2012 *)

%t LinearRecurrence[{2,0,-2,1},{1,5,7,13},60] (* _Harvey P. Dale_, Jun 09 2019 *)

%o (Magma) I:=[1, 5, 7, 13]; [n le 4 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..60]]; // _Vincenzo Librandi_, Jun 09 2012

%o (Python)

%o a = 1

%o for n in range(2,77):

%o print(a, end=",")

%o a = n*(n+1) - a

%o # _Alex Ratushnyak_, Aug 03 2012

%o (Maxima)

%o A178218[1]:1$

%o A178218[n]:=n*(n+1)-A178218[n-1]$

%o makelist(A178218[n],n,1,30); /* _Martin Ettl_, Nov 01 2012 */

%Y Cf. A028242, A273182.

%K nonn,easy

%O 1,2

%A _Eddie Gutierrez_, Dec 19 2010

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 April 29 07:58 EDT 2024. Contains 372098 sequences. (Running on oeis4.)