OFFSET
1,3
COMMENTS
Arises in Routh's theorem.
With offset 0, multiplicative with a(3^e) = 3^(2e-1), a(p^e) = p^(2e) otherwise. - David W. Wilson, Jun 12 2005, corrected by Robert Israel, Apr 28 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Routh's Theorem.
Index entries for linear recurrences with constant coefficients, signature (0,0,3,0,0,-3,0,0,1).
FORMULA
G.f.: x^2*(1 + 4*x + 3*x^2 + 13*x^3 + 13*x^4 + 3*x^5 + 4*x^6 + x^7)/(1 - x^3)^3.
a(n) = (n-1)^2/3 if n-1 == 0 (mod 3), (n-1)^2 otherwise. - David W. Wilson, Jun 12 2005, corrected by Robert Israel, Apr 28 2017
From Amiram Eldar, Aug 11 2022: (Start)
a(n) = numerator((n-1)^2/3).
Sum_{n>=2} 1/a(n) = 11*Pi^2/54. (End)
From Amiram Eldar, Dec 30 2022: (Start)
With offset 0, Dirichlet g.f.: zeta(s-2)*(1-6/3^s).
Sum_{k=1..n} a(k) ~ 7*n^3/27. (End)
MAPLE
seq(numer((n-1)^2/(n^2+n+1)), n=1..51) ; # Zerinvary Lajos, Jun 04 2008
seq(denom(3/n^2-2), n=0..76) ; # Zerinvary Lajos, Jun 04 2008
MATHEMATICA
a[n_] := Numerator[(n - 1)^2/(n^2 + n + 1)]; Array[a, 50] (* Amiram Eldar, Aug 11 2022 *)
PROG
(Magma) [Numerator((n-1)^2/3): n in [1..70]]; // G. C. Greubel, Oct 27 2022
(SageMath) [numerator((n-1)^2/3) for n in range(1, 71)] # G. C. Greubel, Oct 27 2022
(PARI) a(n)=my(q=n\3); [9*q^2-6*q+1, 3*q^2, 9*q^2+6*q+1][n%3+1] \\ Charles R Greathouse IV, May 27 2026
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
STATUS
approved
