cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 14 results. Next

A053755 a(n) = 4*n^2 + 1.

Original entry on oeis.org

1, 5, 17, 37, 65, 101, 145, 197, 257, 325, 401, 485, 577, 677, 785, 901, 1025, 1157, 1297, 1445, 1601, 1765, 1937, 2117, 2305, 2501, 2705, 2917, 3137, 3365, 3601, 3845, 4097, 4357, 4625, 4901, 5185, 5477, 5777, 6085, 6401, 6725, 7057
Offset: 0

Views

Author

Stuart M. Ellerstein (ellerstein(AT)aol.com), Apr 06 2000

Keywords

Comments

Subsequence of A004613: all numbers in this sequence have all prime factors of the form 4k+1. E.g., 40001 = 13*17*181, 13 = 4*3 + 1, 17 = 4*4 + 1, 181 = 4*45 + 1. - Cino Hilliard, Aug 26 2006, corrected by Franklin T. Adams-Watters, Mar 22 2011
A000466(n), A008586(n) and a(n) are Pythagorean triples. - Zak Seidov, Jan 16 2007
Solutions x of the Mordell equation y^2 = x^3 - 3a^2 - 1 for a = 0, 1, 2, ... - Michel Lagneau, Feb 12 2010
Ulam's spiral (NW spoke). - Robert G. Wilson v, Oct 31 2011
For n >= 1, a(n) is numerator of radius r(n) of circle with sagitta = n and cord length = 1. The denominator is A008590(n). - Kival Ngaokrajang, Jun 13 2014
a(n)+6 is prime for n = 0..6 and for n = 15..20. - Altug Alkan, Sep 28 2015

References

  • Donald E. Knuth, The Art of Computer Programming, Addison-Wesley, Reading, MA, 1997, Vol. 1, exercise 1.2.1 Nr. 11, p. 19.

Crossrefs

Column 2 of array A188647.
Cf. A016742, A256970 (smallest prime factors), A214345.
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
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.
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.

Programs

  • GAP
    List([0..45],n->4*n^2+1); # Muniru A Asiru, Nov 01 2018
  • Haskell
    a053755 = (+ 1) . (* 4) . (^ 2)  -- Reinhard Zumkeller, Apr 20 2015
    
  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+2*x+5*x^2)/((1-x)^3))); /* or */ I:=[1,5]; [n le 2 select I[n] else 2*Self(n-1)-Self(n-2)+8: n in [1..50]]; // Vincenzo Librandi, Jun 26 2013
    
  • Maple
    with (combinat):seq(fibonacci(3,2*n), n=0..42); # Zerinvary Lajos, Apr 21 2008
  • Mathematica
    f[n_] := 4n^2 +1; Array[f, 40] (* Vladimir Joseph Stephan Orlovsky, Sep 02 2008 *)
    CoefficientList[Series[(1 + 2 x + 5 x^2) / (1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Jun 26 2013 *)
    LinearRecurrence[{3,-3,1},{1,5,17},50] (* Harvey P. Dale, Dec 28 2021 *)
  • PARI
    for(x=0,100,print1(4*x^2+1",")) \\ Cino Hilliard, Aug 26 2006
    
  • Python
    for n in range(0,50): print(4*n**2+1, end=', ') # Stefano Spezia, Nov 01 2018
    

Formula

a(n) = A000466(n) + 2. - Zak Seidov, Jan 16 2007
From R. J. Mathar, Apr 28 2008: (Start)
O.g.f.: (1 + 2*x + 5*x^2)/(1-x)^3.
a(n) = 3a(n-1) - 3a(n-2) + a(n-3). (End)
Equals binomial transform of [1, 4, 8, 0, 0, 0, ...]. - Gary W. Adamson, Apr 30 2008
a(n) = A156701(n)/A087475(n). - Reinhard Zumkeller, Feb 13 2009
For n>0: a(n) = A176271(2*n,n+1); cf. A016754, A000466. - Reinhard Zumkeller, Apr 13 2010
a(n+1) = denominator of Sum_{k=0..n} (-1)^n*(2*n + 1)^3/((2*n + 1)^4 + 4), see Knuth reference. - Reinhard Zumkeller, Apr 11 2010
a(n) = 8*n + a(n-1) - 4. with a(0)=1. - Vincenzo Librandi, Aug 06 2010
a(n) = ((2*n - 1)^2 + (2*n + 1)^2)/2. - J. M. Bergot, May 31 2012
a(n) = 2*a(n-1) - a(n-2) + 8 with a(0)=1, a(1)=5. - Vincenzo Librandi, Jun 26 2013
a(n+1) = a(n) + A017113(n), a(0) = 1. - Altug Alkan, Sep 26 2015
a(n) = A001844(n) + A046092(n-1) = A001844(n-1) + A046092(n). - Bruce J. Nicholson, Aug 07 2017
From Amiram Eldar, Jul 15 2020: (Start)
Sum_{n>=0} 1/a(n) = (1 + (Pi/2)*coth(Pi/2))/2.
Sum_{n>=0} (-1)^n/a(n) = (1 + (Pi/2)*csch(Pi/2))/2. (End)
From Amiram Eldar, Feb 05 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = sqrt(2)*csch(Pi/2)*sinh(Pi/sqrt(2)).
Product_{n>=1} (1 - 1/a(n)) = (Pi/2)*csch(Pi/2). (End)
E.g.f.: exp(x)*(1 + 2*x)^2. - Stefano Spezia, Jun 10 2021

Extensions

Equation corrected, and examples that were based on a different offset removed, by R. J. Mathar, Mar 18 2010

A073577 a(n) = 4*n^2 + 4*n - 1.

Original entry on oeis.org

7, 23, 47, 79, 119, 167, 223, 287, 359, 439, 527, 623, 727, 839, 959, 1087, 1223, 1367, 1519, 1679, 1847, 2023, 2207, 2399, 2599, 2807, 3023, 3247, 3479, 3719, 3967, 4223, 4487, 4759, 5039, 5327, 5623, 5927, 6239, 6559, 6887, 7223, 7567, 7919, 8279, 8647
Offset: 1

Views

Author

M. N. Deshpande (dpratap(AT)nagpur.dot.net.in), Aug 27 2002

Keywords

Comments

The sum of the squares of two consecutive terms multiplied (or divided) by 2 is always a perfect square. In general, numbers represented by the quadratic form a(n) = (2*i*n + j)^2 - 2*i^2 for any i and j have 2*(a(n)^2 + a(n+1)^2) and (a(n)^2 + a(n+1)^2)/2 as perfect squares: in this case, i=j=1.
The terms of this sequence may be seen to be 2 less than the odd squares. As such they run parallel to those in the square spiral as well as the Ulam square spiral. - Stuart M. Ellerstein (ellerstein(AT)aol.com), Oct 01 2002
Primes in the sequence are in A028871. - Russ Cox, Aug 26 2019
The continued fraction expansion of sqrt(4*a(n)) is [4n+1; {1, n-1, 2, 2n, 2, n-1, 1, 8n+2}]. For n=1, this collapses to [5; {3, 2, 3, 10}]. - Magus K. Chu, Sep 12 2022

Examples

			a(2) = 8*2 + 7 = 23;
a(3) = 8*3 + 23 = 47;
a(4) = 8*4 + 47 = 79. - _Vincenzo Librandi_, Aug 08 2010
		

Crossrefs

Programs

Formula

a(n) = FrobeniusNumber(2*n+1, 2*n+3). - Darrell Minor, Jul 29 2008
a(n) = 8*n + a(n-1) (with a(1)=7). - Vincenzo Librandi, Aug 08 2010
G.f.: x*(7+2*x-x^2)/(1-x)^3. - Robert Israel, Jan 13 2015
E.g.f.: 1 - (1-8*x-4*x^2)*exp(x). - Robert Israel, Jan 13 2015
a(n+1) = a(n) + A008590(n+1), a(1) = 7. - Altug Alkan, Sep 28 2015
a(n) = (2*n+1)+(2*n-1) + (2*n+1)*(2*n-1). - J. M. Bergot, Apr 17 2016
a(n) = (2*n+1)^2 - 2. - Zhandos Mambetaliyev, Jun 13 2017
From Stefano Spezia, Nov 04 2018: (Start)
L.g.f.: 4*x*(2+x)/(1+x)^2-log(1+x).
L.h.g.f.: -4*(-2+x)*x/(-1+x)^2+log(1-x).
(End)
Sum_{n>=1} 1/a(n) = 1 + sqrt(2)*Pi*tan(Pi/sqrt(2))/8. - Amiram Eldar, Jan 03 2021

Extensions

Edited and extended by Henry Bottomley, Oct 10 2002

A214393 Numbers of the form (4k+3)^2+4 or (4k+5)^2-8.

Original entry on oeis.org

13, 17, 53, 73, 125, 161, 229, 281, 365, 433, 533, 617, 733, 833, 965, 1081, 1229, 1361, 1525, 1673, 1853, 2017, 2213, 2393, 2605, 2801, 3029, 3241, 3485, 3713, 3973, 4217, 4493, 4753, 5045, 5321, 5629, 5921, 6245, 6553, 6893, 7217, 7573, 7913, 8285, 8641
Offset: 0

Views

Author

Keywords

Comments

For every n=2k the triple (a(2k-1)^2, a(2k)^2 , a(2k+1)^2) is an arithmetic progression, i.e., 2*a(2k)^2 = a(2k-1)^2 + a(2k+1)^2.
In general a triple((x-y)^2,z^2,(x+y)^2) is an arithmetic progression if and only if x^2+y^2=z^2, e.g., (17^2, 53^2, 73^2).
The first differences of this sequence is the interleaved sequence 4,36,20,52,36,68,52,....

Examples

			a(5) = 2*a(4) - 2*a(2) + a(1) = 2*125 - 2*53 + 17 = 161.
		

Crossrefs

Programs

  • Magma
    I:=[13, 17, 53, 73]; [n le 4 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..75]];
    
  • Mathematica
    A214393[n_] := 4*n*(n+3) + 6*(-1)^n + 7; Array[A214393, 50, 0] (* or *)
    LinearRecurrence[{2, 0, -2, 1}, {13, 17, 53, 73}, 50] (* Paolo Xausa, Feb 22 2024 *)
  • Maxima
    A214393(n):=4*n*(n+3)+6*(-1)^n+7$
    makelist(A214393(n),n,0,30); /* Martin Ettl, Nov 01 2012 */

Formula

a(n) = 2*a(n-1)-2*a(n-3)+a(n-4).
G.f.: (13-9*x+19*x^2-7*x^3)/((1+x)*(1-x)^3).
a(n) = 4*n*(n+3)+6*(-1)^n+7.
2*a(2n)^2 = a(2n-1)^2 + a(2n+1)^2.

A214405 Numbers of the form (4k+3)^2-8 or (4k+5)^2+4.

Original entry on oeis.org

1, 29, 41, 85, 113, 173, 217, 293, 353, 445, 521, 629, 721, 845, 953, 1093, 1217, 1373, 1513, 1685, 1841, 2029, 2201, 2405, 2593, 2813, 3017, 3253, 3473, 3725, 3961, 4229, 4481, 4765, 5033, 5333, 5617, 5933, 6233, 6565, 6881, 7229, 7561, 7925, 8273, 8653
Offset: 1

Views

Author

Keywords

Comments

For every odd n the triple (a(n-1)^2, a(n)^2 , a(n+1)^2) is an arithmetic progression, i.e., 2*a(n)^2 = a(n-1)^2 + a(n+1)^2.
In general a triple((x-y)^2,z^2,(x+y)^2) is an arithmetic progression if and only if x^2+y^2=z^2.
The first differences of this sequence is the interleaved sequence 28,12,44,28,60,44....

Examples

			a(4) = 2*a(3) - 2*a(1) + a(0) = 2*85 - 2*29 + 1 = 113.
		

Crossrefs

Programs

  • Magma
    I:=[1, 29, 41, 85]; [n le 4 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..75]];
    
  • Maxima
    A214405(n):=4*n*(n+3)-6*(-1)^n+7$
    makelist(A214405(n),n,0,30); /* Martin Ettl, Nov 01 2012 */

Formula

a(n) = 2*a(n-1)-2*a(n-3)+a(n-4).
O.G.f.: (1+27*x-17*x^2+5*x^3)/((1+x)*(1-x)^3).
a(n) = 4*n*(n+3)-6*(-1)^n+7.
2*a(2n+1)^2 = a(2n)^2 + a(2n+2)^2.

A216876 20k^2-20k-5 interleaved with 20k^2+5 for k=>0.

Original entry on oeis.org

-5, 5, -5, 25, 35, 85, 115, 185, 235, 325, 395, 505, 595, 725, 835, 985, 1115, 1285, 1435, 1625, 1795, 2005, 2195, 2425, 2635, 2885, 3115, 3385, 3635, 3925, 4195, 4505, 4795, 5125, 5435, 5785, 6115, 6485, 6835, 7225, 7595, 8005, 8395, 8825, 9235, 9685
Offset: 0

Views

Author

Eddie Gutierrez, Sep 18 2012

Keywords

Comments

The sequence (the second in the family) is present as a family of single interleaved sequence of which are separated or factored out of the larger sequence to give individual sequences. The larger sequence produces two smaller interleaved sequences where one of them has the formula above and a first interleaved sequence. There are a total of two sequences in this family.

Crossrefs

Programs

  • Magma
    &cat[[20*k^2-20*k-5, 20*k^2+5]: k in [0..22]]; // Bruno Berselli, Sep 27 2012
    
  • Mathematica
    Flatten[Table[{20*n^2 - 20*n - 5, 20*n^2 + 5}, {n, 0, 30}]] (* T. D. Noe, Sep 26 2012 *)
  • Maxima
    A216876(n):=(5/2)*(2*n*(n-2)-3*(-1)^n+1)$
    makelist(A216876(n),n,0,30); /* Martin Ettl, Nov 01 2012 */
  • PARI
    vector(60,n,k=(n-1)\2;if(n%2,20*k^2-20*k-5,20*k^2+5)) \\ Charles R Greathouse IV, Sep 27 2012
    

Formula

Contribution from Bruno Berselli, Sep 27 2012: (Start)
G.f.: -5*(1-3*x+3*x^2-5*x^3)/((1+x)*(1-x)^3).
a(n) = (5/2)*(2*n*(n-2)-3*(-1)^n+1).
a(n) = 5*A214345(n-3) with A214345(-3)=-1, A214345(-2)=1, A214345(-1)=-1. (End)

Extensions

More terms from T. D. Noe, Sep 26 2012
Definition rewritten by Bruno Berselli, Oct 25 2012

A142954 a(n) = 2*n + 3 + 3*(-1)^n.

Original entry on oeis.org

2, 10, 6, 14, 10, 18, 14, 22, 18, 26, 22, 30, 26, 34, 30, 38, 34, 42, 38, 46, 42, 50, 46, 54, 50, 58, 54, 62, 58, 66, 62, 70, 66, 74, 70, 78, 74, 82, 78, 86, 82, 90, 86, 94, 90, 98, 94, 102, 98, 106, 102, 110, 106, 114, 110
Offset: 1

Views

Author

Paul Curtz, Sep 29 2008

Keywords

Comments

First differences of A142717.

Crossrefs

First differences of A214345.

Programs

  • GAP
    List([1..55],n->2*n+3+3*(-1)^n); # Muniru A Asiru, Nov 01 2018
  • Magma
    I:=[2,10,6]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..60]]; // Vincenzo Librandi, Apr 03 2013
    
  • Maple
    seq(2*n+3+3*(-1)^n,n=1..55); # Muniru A Asiru, Nov 01 2018
  • Mathematica
    Table[2 n + 3 + 3 (-1)^n, {n, 1, 60}] (* Vincenzo Librandi, Apr 03 2013 *)
    LinearRecurrence[{1,1,-1},{2,10,6},60] (* Harvey P. Dale, Aug 20 2015 *)
  • Python
    for n in range(1,50): print(2*n+3+3*(-1)**n, end=', ') # Stefano Spezia, Nov 01 2018
    

Formula

a(2n+1) = A016825(n). a(2n) = A016825(n+1).
From R. J. Mathar, Oct 24 2008: (Start)
G.f.: 2*x*(1+4*x-3*x^2)/((1+x)*(1-x)^2). [corrected by Jason Yuen, Oct 01 2024]
a(n) = a(n-1)+a(n-2)-a(n-3) = 2*A097062(n+2). (End)

Extensions

Edited by R. J. Mathar, Oct 24 2008

A214493 Numbers of the form ((6k+5)^2+9)/2 or 2(3k+4)^2-9.

Original entry on oeis.org

17, 23, 65, 89, 149, 191, 269, 329, 425, 503, 617, 713, 845, 959, 1109, 1241, 1409, 1559, 1745, 1913, 2117, 2303, 2525, 2729, 2969, 3191, 3449, 3689, 3965, 4223, 4517, 4793, 5105, 5399, 5729, 6041, 6389, 6719, 7085, 7433, 7817, 8183, 8585, 8969, 9389, 9791, 10229, 10649, 11105, 11543, 12017, 12473, 12965, 13439, 13949
Offset: 0

Views

Author

Keywords

Comments

For every n=2k the triple (a(2k-1)^2, a(2k)^2 , a(2k+1)^2) is an arithmetic progression, i.e., 2*a(2k)^2 = a(2k-1)^2 + a(2k+1)^2.
In general a triple((x-y)^2,z^2,(x+y)^2) is an arithmetic progression if and only if x^2+y^2=z^2.
The first differences of this sequence is the interleaved sequence 6,42,24,60,42,78.... = 9*n*(39-27*(-1)^n)/2.

Examples

			For n = 7, a(7)=2*a(6)-2*a(4)+a(3)=2*269-2*149+89=329.
		

Crossrefs

Programs

  • Magma
    I:=[17, 23, 65, 89]; [n le 4 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..75]];
  • Mathematica
    LinearRecurrence[{2,0,-2,1},{17,23,65,89},60] (* Harvey P. Dale, Aug 07 2015 *)

Formula

a(n) = 2*a(n-1)-2*a(n-3)+a(n-4).
G.f.: (17-11*x+19*x^2-7*x^3)/((1+x)*(1-x)^3).
a(n) = (6*n*(3*n+10)+27*(-1)^n+41)/4.
2*a(2n)^2 = a(2n-1)^2 + a(2n+1)^2.

A216844 4k^2-8k+2 interleaved with 4k^2-4k+2 for k>=0.

Original entry on oeis.org

2, 2, -2, 2, 2, 10, 14, 26, 34, 50, 62, 82, 98, 122, 142, 170, 194, 226, 254, 290, 322, 362, 398, 442, 482, 530, 574, 626, 674, 730, 782, 842, 898, 962, 1022, 1090, 1154, 1226, 1294, 1370, 1442, 1522, 1598, 1682, 1762, 1850, 1934, 2026, 2114, 2210, 2302, 2402
Offset: 0

Views

Author

Eddie Gutierrez, Sep 17 2012

Keywords

Comments

The sequence is present as a family of single interleaved sequence of which there are many which are separated or factored out to give individual sequences. The larger sequence produces two smaller interleaved sequences where one of them has the formulas above and the other interleaved sequence has the formulas (4n^2 + 4n -1) and (4n^2+1). The latter interleaved sequence is A214345.

Crossrefs

Programs

  • Magma
    &cat[[4*k^2-8*k+2, 4*k^2-4*k+2]: k in [0..25]]; // Bruno Berselli, Sep 30 2012
  • Mathematica
    Flatten[Table[{4 n^2 - 8 n + 2, 4 n^2 - 4 n + 2}, {n, 0, 25}]] (* Bruno Berselli, Sep 30 2012 *)
    LinearRecurrence[{2,0,-2,1},{2,2,-2,2},60] (* Harvey P. Dale, Jul 18 2020 *)

Formula

G.f.: 2*(1-x-3*x^2+5*x^3)/((1+x)*(1-x)^3). [Bruno Berselli, Sep 30 2012]
a(n) = (1/2)*(2*n*(n-4)-3*(-1)^n+7). [Bruno Berselli, Sep 30 2012]
a(n) = 2*A178218(n-3) with A178218(-3)=1, A178218(-2)=1, A178218(-1)=-1, A178218(0)=1. [Bruno Berselli, Oct 01 2012]

Extensions

Definition rewritten by Bruno Berselli, Oct 25 2012

A216865 16k^2-32k+8 interleaved with 16k^2-16k+8 for k>=0.

Original entry on oeis.org

8, 8, -8, 8, 8, 40, 56, 104, 136, 200, 248, 328, 392, 488, 568, 680, 776, 904, 1016, 1160, 1288, 1448, 1592, 1768, 1928, 2120, 2296, 2504, 2696, 2920, 3128, 3368, 3592, 3848, 4088, 4360, 4616, 4904, 5176, 5480, 5768, 6088, 6392, 6728, 7048, 7400, 7736
Offset: 0

Views

Author

Eddie Gutierrez, Sep 18 2012

Keywords

Comments

The sequence (the first in the family) is present as a family of single interleaved sequence of which are separated or factored out of the larger sequence to give individual sequences. The larger sequence produces four smaller interleaved sequences where one of them has the formula above and a second interleaved sequences having the formulas (16n^2-24n+1) and (16n^2-6n+5). This interleaved sequence is A214393. The fourth interleaved sequence in the group has the formulas (16n^2-8n-7) and (16n^2+2n+5) and it is A214405. There are a total of four sequences in this family.

Crossrefs

Programs

  • Magma
    &cat[[16*k^2-32*k+8, 16*k^2-16*k+8]: k in [0..23]]; // Bruno Berselli, Oct 01 2012
    
  • Mathematica
    Flatten[Table[{16 n^2 - 32 n + 8, 16 n^2 - 16 n + 8}, {n, 0, 23}]] (* Bruno Berselli, Sep 30 2012 *)
  • PARI
    vector(47, n, k=(n-1)\2; if(n%2, 16*k^2-32*k+8, 16*k^2-16*k+8)) \\ Bruno Berselli, Oct 01 2012

Formula

G.f.: 8*(1-x-3*x^2+5*x^3)/((1+x)*(1-x)^3). [Bruno Berselli, Sep 30 2012]
a(n) = 2*(2*n*(n-4)-3*(-1)^n+7). [Bruno Berselli, Sep 30 2012]
a(n) = 8*A178218(n-3) with A178218(-3)=1, A178218(-2)=1, A178218(-1)=-1, A178218(0)=1. [Bruno Berselli, Oct 01 2012]

Extensions

Definition rewritten by Bruno Berselli, Oct 25 2012

A216871 16k^2-16k-4 interleaved with 16k^2+4 for k>=0.

Original entry on oeis.org

-4, 4, -4, 20, 28, 68, 92, 148, 188, 260, 316, 404, 476, 580, 668, 788, 892, 1028, 1148, 1300, 1436, 1604, 1756, 1940, 2108, 2308, 2492, 2708, 2908, 3140, 3356, 3604, 3836, 4100, 4348, 4628, 4892, 5188, 5468, 5780, 6076, 6404, 6716, 7060, 7388, 7748, 8092
Offset: 0

Views

Author

Eddie Gutierrez, Sep 18 2012

Keywords

Comments

The sequence (the third in the family) is present as a family of single interleaved sequence of which are separated or factored out of the larger sequence to give individual sequences. The larger sequence produces four smaller interleaved sequences where one of them has the formula above and a second interleaved sequences having the formulas (16n^2-24n+1) and (16n^2-6n+5). This interleaved sequence is A214393. The fourth interleaved sequence in the group has the formulas (16n^2-8n-7) and (16n^2+2n+5) and it is A214405. There are a total of four sequences in this family.

Crossrefs

Programs

  • Magma
    &cat[[16*k^2-16*k-4, 16*k^2+4]: k in [0..23]]; // Bruno Berselli, Sep 27 2012
    
  • Mathematica
    Flatten[Table[{16 n^2 - 16 n - 4, 16 n^2 + 4}, {n, 0, 23}]] (* Bruno Berselli, Sep 26 2012 *)
    LinearRecurrence[{2,0,-2,1},{-4,4,-4,20},50] (* Harvey P. Dale, Dec 09 2015 *)
  • PARI
    vector(47, n, k=(n-1)\2; if(n%2, 16*k^2-16*k-4, 16*k^2+4)) \\ Bruno Berselli, Sep 28 2012

Formula

Contribution from Bruno Berselli, Sep 27 2012: (Start)
G.f.: -4*(1-3*x+3*x^2-5*x^3)/((1+x)*(1-x)^3).
a(n) = 2*(2*n*(n-2)-3*(-1)^n+1).
a(n) = 4*A214345(n-3) with A214345(-3)=-1, A214345(-2)=1, A214345(-1)=-1. (End)

Extensions

Definition rewritten by Bruno Berselli, Oct 25 2012
Showing 1-10 of 14 results. Next