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 17 results. Next

A214345 Interleaved reading of A073577 and A053755.

Original entry on oeis.org

5, 7, 17, 23, 37, 47, 65, 79, 101, 119, 145, 167, 197, 223, 257, 287, 325, 359, 401, 439, 485, 527, 577, 623, 677, 727, 785, 839, 901, 959, 1025, 1087, 1157, 1223, 1297, 1367, 1445, 1519, 1601, 1679, 1765, 1847, 1937, 2023, 2117, 2207, 2305, 2399, 2501
Offset: 0

Views

Author

Keywords

Comments

The elements of this sequence satisfy the property that 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 : in the case of this sequence 7^2, 17^2, and 23^2 is such a triple (i.e. 15-8 =7, 17, 8+15=23, and 8^2+15^2=17^2) .
The first differences of such a sequence is always an interleaved sequence; in this case the interleaved sequence is 2,10,6,14,10,... (A142954).

Examples

			For n = 7, a(7)=2*a(6)-2*a(4)+a(3)=2*65-2*37+23=79
		

Crossrefs

First differences: A142954; 2-element moving average (a(n-1) + a(n))/2: A002378. - Guenther Schrack, Oct 25 2018

Programs

  • GAP
    a:=[7,17];; for n in [3..50] do a[n]:=4*(n+1)+a[n-2]; od; Concatenation([5],a); # Muniru A Asiru, Oct 26 2018
  • Magma
    I:=[5, 7, 17, 23];[n le 4 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..75]];
    
  • Maple
    seq(coeff(series((x^3-3*x^2+3*x-5)/((x-1)^3*(x+1)),x,n+1), x, n), n = 0 .. 50); # Muniru A Asiru, Oct 26 2018
  • Mathematica
    LinearRecurrence[{2,0,-2,1},{5,7,17,23},50] (* Harvey P. Dale, Apr 02 2018 *)
  • Maxima
    A214345(n):=(2*n*(n+4)+3*(-1)^n+7)/2$
    makelist(A214345(n),n,0,30); /* Martin Ettl, Nov 01 2012 */
    

Formula

a(2n+1) = A073577(n+1); a(2n) = A053755(n+1).
a(n+1)-a(n) = A142954(n+1).
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4).
G.f.: (x^3-3*x^2+3*x-5)/((x-1)^3*(x+1)).
a(n) = (2*n*(n+4)+3*(-1)^n+7)/2.
2*a(2n)^2 = a(2n-1)^2 + a(2n+1)^2.
a(n) = 4*(n+1) + a(n-2) for n > 1; a(-n) = a(n-4). - Guenther Schrack, Oct 24 2018
E.g.f.: (5 + 5*x + x^2)*cosh(x) + (2 + 5*x + x^2)*sinh(x). - Stefano Spezia, Feb 22 2024

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

A273182 a(n) is the second number in a triple consisting of 3 numbers, which when squared are part of a right diagonal of a magic square of squares.

Original entry on oeis.org

14, 84, 490, 2856, 16646, 97020, 565474, 3295824, 19209470, 111960996, 652556506, 3803378040, 22167711734, 129202892364, 753049642450, 4389094962336, 25581520131566, 149100025827060, 869018634830794, 5065011783157704, 29521052064115430, 172061300601534876
Offset: 0

Views

Author

Eddie Gutierrez, May 17 2016

Keywords

Comments

The multiplying factor 6 appears to come from the ratio of a(1)/a(0) of the sequence. Each of the lines of tables (V vs VII) or (VI vs VIII) in oddwheel.com/ImaginaryB.html generates this factor.

Examples

			a(2) = 84*6 -14 = 490; a(3) = 490*6 - 84 = 2856; a(4) = 2856*6 - 490 = 16646.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[14/(1 - 6 x + x^2), {x, 0, 21}], x] (* Michael De Vlieger, May 18 2016 *)
  • PARI
    Vec(14/(1-6*x+x^2) + O(x^50)) \\ Colin Barker, May 18 2016

Formula

a(0)=14, a(1)= 84, a(n+1)= a(n)*6 - a(n-1).
G.f.: 14 / (1-6*x+x^2). - Colin Barker, May 18 2016
E.g.f.: 7*(3*sqrt(2)*sinh(2*sqrt(2)*x) + 4*cosh(2*sqrt(2)*x))*exp(3*x)/2. - Ilya Gutkovskiy, May 18 2016

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.

A215098 a(0)=0, a(1)=1, a(n) = n*(n-1) - a(n-2).

Original entry on oeis.org

0, 1, 2, 5, 10, 15, 20, 27, 36, 45, 54, 65, 78, 91, 104, 119, 136, 153, 170, 189, 210, 231, 252, 275, 300, 325, 350, 377, 406, 435, 464, 495, 528, 561, 594, 629, 666, 703, 740, 779, 820, 861, 902, 945, 990, 1035, 1080, 1127, 1176, 1225, 1274, 1325, 1378, 1431
Offset: 0

Views

Author

Alex Ratushnyak, Aug 03 2012

Keywords

Comments

Same seed, b(n) = n*(n+1) - b(n-2) : 0, 1, 6, 11, 14, 19, 28, 37, 44, 53, 66, 79, 90, 103, 120, 137, 152, 169, 190, 211, 230, 251, 276, 301, 324, 349, 378, 407, 434, 463, 496, 529, 560, 593, ...
b(n) = a(n+1) - 1 if (n mod 4) < 2, otherwise b(n) = a(n+1) + 1.

Crossrefs

Cf. A007590 (a(0)=0, a(n) = n*(n-1) - a(n-1)).
Cf. A178218 (a(1)=1, a(n) = n*(n+1) - a(n-1)).

Programs

  • Magma
    [n le 2 select n-1 else  2*Binomial(n-1,2) -Self(n-2): n in [1..81]]; // G. C. Greubel, Nov 25 2022
    
  • Mathematica
    CoefficientList[Series[(x -x^2 +3x^3 -x^4)/(1 -3x +4x^2 -4x^3 +3x^4 -x^5), {x, 0, 70}], x] (* Vincenzo Librandi, Jul 18 2013 *)
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==n(n-1)-a[n-2]},a,{n,60}] (* or *) LinearRecurrence[{3,-4,4,-3,1},{0,1,2,5,10},60] (* Harvey P. Dale, May 15 2016 *)
  • Python
    prpr = 0
    prev = 1
    for n in range(2,77):
        print(prpr, end=', ')
        curr = n*(n-1) - prpr
        prpr = prev
        prev = curr
    
  • SageMath
    def A215098(n):
        if (n<2): return n
        else: return 2*binomial(n,2) - A215098(n-2)
    [A215098(n) for n in range(81)] # G. C. Greubel, Nov 25 2022

Formula

G.f.: x*(1-x+3*x^2-x^3)/(1-3*x+4*x^2-4*x^3+3*x^4-x^5). - David Scambler, Aug 06 2012
a(n) = (n^2 +n -1 +cos(pi*n/2) +sin(pi*n/2))/2. - Vaclav Kotesovec, Aug 11 2012

A273189 a(n) is the third number in a triple consisting of 3 numbers, which when squared are part of a right diagonal of a magic square of squares.

Original entry on oeis.org

51, 401, 2451, 14401, 84051, 490001, 2856051, 16646401, 97022451, 565488401, 3295908051, 19209960001, 111963852051, 652573152401, 3803475062451, 22168277222401, 129206188272051, 753068852410001, 4389206926188051, 25582172704718401, 149103829302122451
Offset: 0

Views

Author

Eddie Gutierrez, May 17 2016

Keywords

Comments

The multiplying factor 6 (in the recursion formulas below) appears to come from the ratio of b(1)/b(0) of the sequence. Each of the lines of tables (V vs VII) or (VI vs VIII) in oddwheel.com/ImaginaryB.html generates this factor.
k is obtained from the difference of the offsets of two relate sequences. this one, (II), starting at 51 and a second, (I), at 99 (to be submitted separately). Thus, k =[Ic(n)- IIc(n)]*2. When n=0, Ic(0)=99 and IIc(0)=51 giving the value for k of (99-51)*2=96. Furthermore, k is the same constant number for any value of n.
The differences between number in the sequence are identical in both of the related sequences.

Examples

			a(2)= 401*6 - (51 - 96)= 2451;
a(3)= 2451*6 - (401 - 96)= 14401;
a(4)= 14401*6 - (2451 - 96)= 84051.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(51 + 44 x + x^2)/((1 - x) (1 - 6 x + x^2)), {x, 0, 20}], x] (* Michael De Vlieger, May 18 2016 *)
    LinearRecurrence[{7,-7,1},{51,401,2451},30] (* Harvey P. Dale, Feb 21 2020 *)
  • PARI
    Vec((51+44*x+x^2)/((1-x)*(1-6*x+x^2)) + O(x^50)) \\ Colin Barker, May 18 2016

Formula

a(0)= 51, a(1)= 401, a(n+1)= a(n)*6 - a(n-1) + k where k=96.
From Colin Barker, May 18 2016: (Start)
a(n) = (-24+25/2*(3-2*sqrt(2))^(1+n)+25/2*(3+2*sqrt(2))^(1+n)).
a(n) = 7*a(n-1)-7*a(n-2)+a(n-3) for n>2.
G.f.: (51+44*x+x^2) / ((1-x)*(1-6*x+x^2)).
(End)

Extensions

More terms from Colin Barker, May 18 2016

A014112 a(n) = n*(n-1) + (n-2)*(n-3) + ... + 1*0 + 1 for n odd; otherwise, a(n) = n*(n-1) + (n-2)*(n-3) + ... + 2*1.

Original entry on oeis.org

1, 2, 7, 14, 27, 44, 69, 100, 141, 190, 251, 322, 407, 504, 617, 744, 889, 1050, 1231, 1430, 1651, 1892, 2157, 2444, 2757, 3094, 3459, 3850, 4271, 4720, 5201, 5712, 6257, 6834, 7447, 8094, 8779, 9500, 10261, 11060, 11901, 12782, 13707, 14674, 15687
Offset: 1

Views

Author

Jon Wild, Jul 14 1997

Keywords

Examples

			From _Bruno Berselli_, Mar 12 2018: (Start)
n=1: 1;
n=2: 1*2;
n=3: 1 + 0*1 + 2*3 = 7;
n=4: 1*2 + 3*4 = 14;
n=5: 1 + 0*1 + 2*3 + 4*5 = 27;
n=6: 1*2 + 3*4 + 5*6 = 44;
n=7: 1 + 0*1 + 2*3 + 4*5 + 6*7 = 69, etc.
(End)
		

Crossrefs

Cf. A064999, A178218 (first differences).

Programs

  • Magma
    [n le 2 select n else Self(n-2)+n*(n-1):n in [1..50]]; // Vincenzo Librandi, Feb 28 2016
    (C#) public BigInteger a(BigInteger n) => (n * (n + 2) * (2 * n - 1) + 9) / 12; // Delbert L. Johnson, Mar 19 2023
  • Mathematica
    LinearRecurrence[{3, -2, -2, 3, -1}, {1, 2, 7, 14, 27}, 50] (* Vincenzo Librandi, Feb 28 2016 *)

Formula

a(n) = a(n-2) + n*(n-1) for n > 2, a(1)=1, a(2)=2.
G.f.: x*(1 - x^3 + 3*x^2 - x)/((x + 1)*(x - 1)^4). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 10 2009
a(n) + a(n+1) = A064999(n). - R. J. Mathar, Feb 27 2016
a(n) = n*(n + 2)*(2*n - 1)/12 + 3*(1 - (-1)^n)/8. - Bruno Berselli, Mar 12 2018

Extensions

More terms from Erich Friedman

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
Showing 1-10 of 17 results. Next