OFFSET
0,2
COMMENTS
This may also be construed as the number of line segments illustrating the isometric projection of a cube of side length n. Moreover, a(n) equals the number of rods making a cube of side length n+1 minus the number of rods making a cube of side length n. See the illustration in the links and formula below.
LINKS
Ivan Panchenko, Table of n, a(n) for n = 0..1000
Peter M. Chema, Illustration of initial terms as the first difference of number of rods required to make a 3-D cube.
Amelia Carolina Sparavigna, The groupoids of Mersenne, Fermat, Cullen, Woodall and other Numbers and their representations by means of integer sequences, Politecnico di Torino, Italy (2019), [math.NT].
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = a(n-1) + 6*(3*n-1) (with a(0)=0). - Vincenzo Librandi, Nov 18 2010
G.f.: 6*x*(2+x)/(1-x)^3. - Colin Barker, Feb 12 2012
a(n) = 6*A005449(n). - R. J. Mathar, Feb 13 2016
From Amiram Eldar, Jan 14 2021: (Start)
Sum_{n>=1} 1/a(n) = 1 - Pi/(6*sqrt(3)) - log(3)/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = -1 + Pi/(3*sqrt(3)) + 2*log(2)/3. (End)
MAPLE
a:= n-> 3*n*(3*n+1): seq(a(n), n=0..42); # Zerinvary Lajos, May 03 2007
MATHEMATICA
f[n_]:=3*n*(3*n+1); f[Range[0, 60]] (* Vladimir Joseph Stephan Orlovsky, Feb 05 2011 *)
PROG
(PARI) a(n) = 3*n*(3*n+1) \\ Charles R Greathouse IV, Feb 27 2017
(Python) def a(n): return 3*n*(3*n+1) # Indranil Ghosh, Mar 26 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved