This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A045945 #83 Dec 13 2024 18:21:40 %S A045945 0,12,42,90,156,240,342,462,600,756,930,1122,1332,1560,1806,2070,2352, %T A045945 2652,2970,3306,3660,4032,4422,4830,5256,5700,6162,6642,7140,7656, %U A045945 8190,8742,9312,9900,10506,11130,11772,12432,13110,13806,14520,15252,16002,16770,17556 %N A045945 Hexagonal matchstick numbers: a(n) = 3*n*(3*n+1). %C A045945 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. %H A045945 Ivan Panchenko, <a href="/A045945/b045945.txt">Table of n, a(n) for n = 0..1000</a> %H A045945 Peter M. Chema, <a href="/A045945/a045945.pdf">Illustration of initial terms as the first difference of number of rods required to make a 3-D cube</a>. %H A045945 Craig Knecht, <a href="/A045945/a045945.png">Number of positions a frame shifted H1 hexagon can occupy in a hexagon of order n</a>. %H A045945 Amelia Carolina Sparavigna, <a href="https://doi.org/10.5281/zenodo.3471358">The groupoids of Mersenne, Fermat, Cullen, Woodall and other Numbers and their representations by means of integer sequences</a>, Politecnico di Torino, Italy (2019), [math.NT]. %H A045945 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1). %F A045945 a(n) = a(n-1) + 6*(3*n-1) (with a(0)=0). - _Vincenzo Librandi_, Nov 18 2010 %F A045945 G.f.: 6*x*(2+x)/(1-x)^3. - _Colin Barker_, Feb 12 2012 %F A045945 a(n) = 6*A005449(n). - _R. J. Mathar_, Feb 13 2016 %F A045945 a(n) = A059986(n) - A059986(n-1). - _Peter M. Chema_, Feb 26 2017 %F A045945 a(n) = 6*(A000217(n) + A000290(n)). - _Peter M. Chema_, Mar 26 2017 %F A045945 From _Amiram Eldar_, Jan 14 2021: (Start) %F A045945 Sum_{n>=1} 1/a(n) = 1 - Pi/(6*sqrt(3)) - log(3)/2. %F A045945 Sum_{n>=1} (-1)^(n+1)/a(n) = -1 + Pi/(3*sqrt(3)) + 2*log(2)/3. (End) %F A045945 From _Elmo R. Oliveira_, Dec 12 2024: (Start) %F A045945 E.g.f.: 3*exp(x)*x*(4 + 3*x). %F A045945 a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 3. (End) %p A045945 a:= n-> 3*n*(3*n+1): seq(a(n), n=0..42); # _Zerinvary Lajos_, May 03 2007 %t A045945 f[n_]:=3*n*(3*n+1);f[Range[0,60]] (* _Vladimir Joseph Stephan Orlovsky_, Feb 05 2011 *) %o A045945 (PARI) a(n) = 3*n*(3*n+1) \\ _Charles R Greathouse IV_, Feb 27 2017 %o A045945 (Python) def a(n): return 3*n*(3*n+1) # _Indranil Ghosh_, Mar 26 2017 %Y A045945 Cf. A000217, A000290, A005449, A033580, A059986. %Y A045945 The hexagon matchstick sequences are: Number of matchsticks: this sequence; size=1 triangles: A033581; larger triangles: A307253; total triangles: A045949. Analog for triangles: A045943; analog for stars: A045946. - _John King_, Apr 05 2019 %K A045945 nonn,easy %O A045945 0,2 %A A045945 _R. K. Guy_