OFFSET
0,3
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).
LINKS
Muniru A Asiru, Table of n, a(n) for n = 0..10000
Wikipedia, Quasi-polynomial
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).
MAPLE
seq(numer( (n^2 + 2)/(n + 2) ), n = 0..100);
PROG
(GAP) List([0..100], n->NumeratorRat((n^2+2)/(n+2)); # Muniru A Asiru, Feb 25 2019
(PARI) a(n) = numerator((n^2 + 2)/(n + 2)); \\ Michel Marcus, Feb 26 2019
CROSSREFS
KEYWORD
AUTHOR
Peter Bala, Feb 14 2019
STATUS
approved