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

A306367 a(n) = numerator of (n^2 + 2)/(n + 2).

Original entry on oeis.org

1, 1, 3, 11, 3, 27, 19, 17, 33, 83, 17, 123, 73, 57, 99, 227, 43, 291, 163, 121, 201, 443, 81, 531, 289, 209, 339, 731, 131, 843, 451, 321, 513, 1091, 193, 1227, 649, 457, 723, 1523, 267, 1683, 883, 617, 969, 2027, 353, 2211, 1153, 801, 1251, 2603, 451
Offset: 0

Views

Author

Peter Bala, Feb 14 2019

Keywords

Comments

If P(x) and Q(x) are coprime integral polynomials such that Q(n) > 0 for n >= 0 then the sequence of numerators of the rational numbers P(n)/Q(n) for n >= 0 and the sequence of denominators of P(n)/Q(n) for n >= 0 are both quasi-polynomial in n. In fact, there exists a purely periodic sequence b(n) such that numerator(P(n)/Q(n)) = P(n)/b(n) and denominator(P(n)/Q(n)) = Q(n)/b(n).
Here we take P(n) = n^2 + 2 and Q(n) = n + 2. Cf. A228564 (case P(n) = n^2 + 1, Q(n) = n + 1).

Crossrefs

Programs

  • GAP
    List([0..100],n->NumeratorRat((n^2+2)/(n+2)); # Muniru A Asiru, Feb 25 2019
    
  • Maple
    seq(numer( (n^2 + 2)/(n + 2) ), n = 0..100);
  • PARI
    a(n) = numerator((n^2 + 2)/(n + 2)); \\ Michel Marcus, Feb 26 2019

Formula

O.g.f.: (3*x^17 + x^16 + 11*x^15 + 9*x^14 + 9*x^13 + 19*x^12 + 42*x^11 + 8*x^10 + 50*x^9 + 24*x^8 + 14*x^7 + 16*x^6 + 27*x^5 + 3*x^4 + 11*x^3 + 3*x^2 + x + 1)/(1 - x^6)^3.
a(n) = (n^2 + 2)/b(n), where (b(n))n>=0 is the purely periodic sequence [2, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6, 1, ...] with period 6.
a(n) is a quasi-polynomial in n: a(6*n) = 18*n^2 + 1; a(6*n+1) = 12*n^2 + 4*n + 1; a(6*n+2) = 18*n^2 + 12*n + 3; a(6*n+3) = 36*n^2 + 36*n + 11; a(6*n+4) = 6*n^2 + 8*n + 3; a(6*n+5) = 36*n^2 + 60*n + 27.
a(n) = (n^2 + 2)/( gcd(n+2,2)*gcd(n+2,3) ).
a(n) = (n^2 + 2)/(n + 2) * A060789(n+2).

A194767 Denominator of the fourth increasing diagonal of the autosequence of second kind from (-1)^n / (n+1).

Original entry on oeis.org

2, 2, 12, 20, 10, 42, 56, 24, 90, 110, 44, 156, 182, 70, 240, 272, 102, 342, 380, 140, 462, 506, 184, 600, 650, 234, 756, 812, 290, 930, 992, 352, 1122, 1190, 420, 1332, 1406, 494, 1560, 1640, 574, 1806, 1892, 660, 2070, 2162, 752, 2352, 2450, 850, 2652, 2756, 954, 2970, 3080, 1064, 3306, 3422, 1180, 3660
Offset: 0

Views

Author

Paul Curtz, Sep 02 2011

Keywords

Comments

The autosequence of first kind from (-1)^n/(n+1) is A189733.
For the second kind (the second increasing diagonal is (-1)^n/(n+1), half of the main one):
2, 1, 0, -1/2, -1/3, 1/6, 1/2, 5/12,
-1, -1, -1/2, 1/6, 1/2, 1/3, -1/12, -7/20,
0, 1/2, 2/3, 1/3, -1/6, -5/12, -4/15, 1/12,
1/2, 1/6, -1/3, -1/2, -1/4, 3/20, 7/20, 13/60,
-1/3, -1/2, -1/6, 1/4, 2/5, 1/5, -2/15, -3/10,
-1/6, 1/3, 5/12, 3/20, -1/5, -1/3, -1/6, 5/42,
1/2, 1/12, -4/15, -7/20, -2/15, 1/6, 2/7, 1/7,
-5/12, -7/20, -1/12, 13/60, 3/10, 5/42, -1/7, -1/4.
Main diagonal: (period 2:repeat 2, -1)/A026741(n+1).
Second (increasing) diagonal: (-1)^n / (n+1).
Third (increasing) diagonal: (-1)^(n+1)*A026741(n) / A045896(n).
Fourth (increasing) diagonal: (-1)^(n+1)*A146535(n)/ a(n).

Crossrefs

Programs

  • Mathematica
    c = Table[1/9 (7 n + 7 n^2 + 2 n Cos[2 n *Pi/3] + 2 n^2 Cos[2 n *Pi/3] + 2 Sqrt[3] n Sin[2 n *Pi/3] + 2 Sqrt[3] n^2 Sin[2 n *Pi/3]), {n, 1, 50}] (* Roger Bagula, Mar 25 2012 *)
    a[n_] := (n+1) * Numerator[(n+2)/3]; Array[a, 60, 0] (* Amiram Eldar, Sep 17 2023 *)
    LinearRecurrence[{0,0,3,0,0,-3,0,0,1},{2,2,12,20,10,42,56,24,90},60] (* Harvey P. Dale, May 15 2025 *)

Formula

a(3*n) = (3*n+1)*(3*n+2), a(3*n+1) = (n+1)*(3*n+2), a(3*n+2) = 3*(n+1)*(3*n+4).
G.f.: 2*(1+x+6*x^2+7*x^3+2*x^4+3*x^5+x^6)/(1-x^3)^3. - Jean-François Alcover, Nov 11 2016
a(n+2) = 2 * A306368(n) for n >= 0. - Joerg Arndt, Aug 25 2023
a(n) = (n+1) * A051176(n+2) for n >= 0. - Paul Curtz, Sep 13 2023
Sum_{n>=0} 1/a(n) = 1 + log(3) - Pi/(3*sqrt(3)). - Amiram Eldar, Sep 17 2023

A306764 a(n) is a sequence of period 12: repeat [1, 1, 6, 2, 1, 3, 2, 2, 3, 1, 2, 6].

Original entry on oeis.org

1, 1, 6, 2, 1, 3, 2, 2, 3, 1, 2, 6, 1, 1, 6, 2, 1, 3, 2, 2, 3, 1, 2, 6, 1, 1, 6, 2, 1, 3, 2, 2, 3, 1, 2, 6, 1, 1, 6, 2, 1, 3, 2, 2, 3, 1, 2, 6, 1, 1, 6, 2, 1, 3, 2, 2, 3, 1, 2, 6, 1, 1, 6, 2, 1, 3, 2, 2, 3, 1, 2, 6
Offset: 0

Views

Author

Paul Curtz, Mar 08 2019

Keywords

Comments

a(1) to a(12) is a palindrome.
A089145(n) = A089128(n+3).
A089128(n) = A089145(n+3).
a(1) + a(2) + a(3) + a(4) = a(5) + a(6) + a(7) + a(8) = a(9) + a(10) + a(11) + a(12) = 10.

Examples

			a(0) =  6/6  = 1;
a(1) = 10/10 = 1;
a(2) = 30/5  = 6;
a(3) = 42/21 = 2.
		

Crossrefs

Cf. A064038, A089128 and A089145 (shifted bisections), A306368, A010692.

Programs

  • Mathematica
    PadRight[{},120,{1,1,6,2,1,3,2,2,3,1,2,6}] (* or *) LinearRecurrence[ {0,0,1,0,0,-1,0,0,1},{1,1,6,2,1,3,2,2,3},120] (* Harvey P. Dale, Dec 16 2021 *)
  • PARI
    Vec((1 + x + 6*x^2 + x^3 - 3*x^5 + x^6 + 2*x^7 + 6*x^8) / ((1 - x)*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)) + O(x^80)) \\ Colin Barker, Dec 11 2019

Formula

a(n) = 2*A064038(n+3)/A306368(n).
a(n) = interleave A089128(n-1), A089128(n+1).
a(n) = interleave A089145(n+2), A089145(n-2).
From Colin Barker, Dec 09 2019: (Start)
G.f.: (1 + x + 6*x^2 + x^3 - 3*x^5 + x^6 + 2*x^7 + 6*x^8) / ((1 - x)*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)).
a(n) = a(n-3) - a(n-6) + a(n-9) for n>8.
(End)
Showing 1-3 of 3 results.