OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Hamiltonian Path.
Eric Weisstein's World of Mathematics, Ladder Graph.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
For n>2, m=p^3*q (p,q = primes), a(n) = Sum_{d|m} (n-1)^(bigomega(d)-omega(d)) = Sum_{d|m} (n-1)^(A001222(d)-A001221(d)). - Jaroslav Krizek, Sep 24 2009
For n>1, a(n) = 2*(n^2-n+2); first diagonal of [A154685]. - Vincenzo Librandi, Nov 24 2010
G.f.: 2*x*(1+x-x^2+x^3)/(1-x)^3. - Colin Barker, Jan 20 2012
Sum_{n>=1} 1/a(n) = 1/4 + Pi*tanh(sqrt(7)*Pi/2)/(2*sqrt(7)). - Amiram Eldar, Dec 23 2022
MAPLE
MATHEMATICA
CoefficientList[Series[2*x*(1 + x - x^2 + x^3)/(1 - x)^3, {x, 0, 50}], x] (* G. C. Greubel, Apr 25 2017 *)
LinearRecurrence[{3, -3, 1}, {2, 8, 16, 28}, 70] (* Harvey P. Dale, Nov 15 2018 *)
PROG
(PARI) my(x='x+O('x^50)); Vec(2*x*(1 + x - x^2 + x^3)/(1 - x)^3) \\ G. C. Greubel, Apr 25 2017
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Eric W. Weisstein, Feb 20 2008
EXTENSIONS
Extended and formula corrected by Max Alekseyev, Apr 11 2009
Corrected the formula which was confusing offsets - R. J. Mathar, Jun 04 2010
STATUS
approved