OFFSET
0,3
COMMENTS
Partial sums give the generalized 13-gonal (or tridecagonal) numbers A195313.
a(n) is also the length of the n-th line segment of a rectangular spiral on the infinite square grid. The vertices of the spiral are the generalized 13-gonal numbers. - Omar E. Pol, Jul 27 2018
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
From Bruno Berselli, Sep 15 2011: (Start)
G.f.: x*(1+9*x+x^2)/((1-x)^2*(1+x)^2).
a(n) = (7*(-1)^n+11)*n/4.
a(n) + a(n-1) = A175885(n).
Sum_{i=0..n} a(i) = A195313(n). (End)
Multiplicative with a(2^e) = 9*2^(e-1), a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 7/2^s). - Amiram Eldar, Oct 25 2023
MATHEMATICA
With[{nn=30}, Riffle[9Range[0, nn], Range[1, 2nn+1, 2]]] (* Harvey P. Dale, Sep 24 2011 *)
PROG
(Magma) /* By definition */ &cat[[9*n, 2*n+1]: n in [0..33]]; // Bruno Berselli, Sep 16 2011
(PARI) a(n)=(7*(-1)^n+11)*n/4 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Omar E. Pol, Sep 14 2011
STATUS
approved