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-2 of 2 results.

A255843 a(n) = 2*n^2 + 4.

Original entry on oeis.org

4, 6, 12, 22, 36, 54, 76, 102, 132, 166, 204, 246, 292, 342, 396, 454, 516, 582, 652, 726, 804, 886, 972, 1062, 1156, 1254, 1356, 1462, 1572, 1686, 1804, 1926, 2052, 2182, 2316, 2454, 2596, 2742, 2892, 3046, 3204, 3366, 3532, 3702, 3876, 4054, 4236, 4422
Offset: 0

Views

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

This is the case k=2 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2.
Equivalently, numbers m such that 2*m - 8 is a square.

Crossrefs

Cf. A059100.
Cf. unsigned A147973: numbers of the form 2*m^2-4.
Cf. sequences of the form 2*m^2+2*k: A005893 (k=1), this sequence (k=2), A255844 (k=3), A155966 (k=4), A255845 (k=5), A255842 (k=6), A255846 (k=7), A255847 (k=8), A255848 (k=9).

Programs

  • Magma
    [2*n^2+4: n in [0..50]];
  • Mathematica
    Table[2 n^2 + 4, {n, 0, 50}]
  • PARI
    vector(50, n, n--; 2*n^2+4)
    
  • Sage
    [2*n^2+4 for n in (0..50)]
    

Formula

G.f.: 2*(2 - 3*x + 3*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 2*A059100(n).
a(n) = a(n-1) + 4n - 2. - Bob Selcoe, Mar 25 2020
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(2)*Pi*coth(sqrt(2)*Pi))/8.
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(2)*Pi*cosech(sqrt(2)*Pi))/8. (End)
E.g.f.: 2*exp(x)*(2 + x + x^2). - Stefano Spezia, Aug 07 2024

Extensions

Edited by Bruno Berselli, Mar 13 2015

A267942 Interleave (n-1)^2 + 2 and (n+1)^2 + 2.

Original entry on oeis.org

3, 3, 2, 6, 3, 11, 6, 18, 11, 27, 18, 38, 27, 51, 38, 66, 51, 83, 66, 102, 83, 123, 102, 146, 123, 171, 146, 198, 171, 227, 198, 258, 227, 291, 258, 326, 291, 363, 326, 402, 363, 443, 402, 486, 443, 531, 486, 578, 531, 627, 578, 678, 627, 731, 678, 786, 731
Offset: 0

Views

Author

Paul Curtz, Jan 22 2016

Keywords

Comments

Trisections:
3, 6, 6, 27, 27, 66, 66, ... = 3*(1, 2, 2, 9, 9, 22, 22, ... ). See A056105.
3, 3, 18, 18, 51, 51, 102, ... = 3*(1, 1, 6, 6, 17, 17, ... ). See A056109.
2, 11, 11, 38, 38, 83, 83, ... (== 2 (mod 9)).
The trisections also have the signature (1,2,-2,-1,1). The corresponding main sequence is 0, 0, 0, 0, 1, 1, 3, 3, ... = A161680(n) with each term duplicated.

Examples

			a(0) = (2+13)/5, a(1) = (13+2)/5, a(2) = (5+5)/5, a(3) = (29+1)/5, ... (using first formula).
		

Crossrefs

Programs

  • Magma
    &cat [[(n-1)^2+2, (n+1)^2+2]: n in [0..50]]; // Vincenzo Librandi, Jan 23 2016
  • Mathematica
    Flatten[Table[{n^2 - 2 n + 3, n^2 + 2 n + 3}, {n, 0, 30}]] (* Vincenzo Librandi, Jan 23 2016 *)
    CoefficientList[Series[(3 - 7 x^2 + 4 x^3 + 2 x^4)/((1 - x)^3 (1 + x)^2), {x, 0, 56}], x] (* Michael De Vlieger, Jan 24 2016 *)
  • PARI
    Vec((3-7*x^2+4*x^3+2*x^4)/((1-x)^3*(1+x)^2) + O(x^100)) \\ Colin Barker, Jan 22 2016
    

Formula

a(n) = (A261327(n+2) + A261327(n-3))/5.
a(n+1) = a(n) + (-1)^n * A022998(n), a(0)=3.
a(n+3) = a(n) + 3*A193356(n), a(0)=a(1)=3, a(2)=2.
a(n) = 3 + A174474(n).
a(2n) + a(2n+1) = A255844(n).
From Colin Barker, Jan 22 2016: (Start)
a(n) = (2*n^2 - 6*(-1)^n*n - 2*n + 3*(-1)^n + 21)/8.
a(n) = (n^2 - 4*n + 12)/4 for n even.
a(n) = (n^2 + 2*n + 9)/4 for n odd.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4.
G.f.: (3 - 7*x^2 + 4*x^3 + 2*x^4) / ((1-x)^3*(1+x)^2).
(End)

Extensions

More terms from Colin Barker, Jan 22 2016
Showing 1-2 of 2 results.