OFFSET
0,2
COMMENTS
a(n) is the number of edges in (n+1) X (n+1) square grid with all horizontal, vertical and diagonal segments filled in. - Asher Auel, Jan 12 2000
In other words, the edge count of the (n+1) X (n+1) king graph. - Eric W. Weisstein, Jun 20 2017
Write 0,1,2,... in clockwise spiral; sequence gives numbers on one of 4 diagonals. (See Example section.)
The identity (4*n+1)^2 - (4*n^2+2*n)*(2)^2 = 1 can be written as A016813(n)^2 - a(n)*2^2 = 1. - Vincenzo Librandi, Jul 20 2010 - Nov 25 2012
Starting with "6" = binomial transform of [6, 14, 8, 0, 0, 0, ...]. - Gary W. Adamson, Aug 27 2010
The hyper-Wiener index of the crown graph G(n) (n>=3). The crown graph G(n) is the graph with vertex set {x(1), x(2), ..., x(n), y(1), y(2), ..., y(n)} and edge set {(x(i), y(j)): 1 <= i,j <= n, i != j} (= the complete bipartite graph K(n,n) with horizontal edges removed). The Hosoya-Wiener polynomial of G(n) is n(n-1)(t+t^2)+nt^3. - Emeric Deutsch, Aug 29 2013
Sum of the numbers from n to 3n. - Wesley Ivan Hurt, Oct 27 2014
REFERENCES
R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd ed., 1994, p. 99.
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
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].
Leo Tavares, Illustration: Twin Diamond Stars.
Eric Weisstein's World of Mathematics, Crown Graph.
Eric Weisstein's World of Mathematics, Edge Count.
Eric Weisstein's World of Mathematics, King Graph.
Eric Weisstein's World of Mathematics, Queen Graph.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 4*n^2 + 2*n.
a(n) = 2*A014105(n). - Omar E. Pol, May 21 2008
a(n) = floor((2*n + 1/2)^2). - Reinhard Zumkeller, Feb 20 2010
a(n) = 8*n+a(n-1) - 2 with a(0)=0. - Vincenzo Librandi, Jul 20 2010
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Aug 11 2011
a(n+1) = A045896(2*n+1). - Reinhard Zumkeller, Dec 12 2011
G.f.: 2*x*(3+x)/(1-x)^3. - Colin Barker, Jan 14 2012
From R. J. Mathar, Jan 15 2013: (Start)
Sum_{n>=1} 1/a(n) = 1 - log(2).
Sum_{n>=1} 1/a(n)^2 = 2*log(2) + Pi^2/6 - 3. (End)
a(n) = A118729(8*n+5). - Philippe Deléham, Mar 26 2013
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/4 + log(2)/2 - 1. - Amiram Eldar, Feb 22 2022
E.g.f.: 2*exp(x)*x*(3 + 2*x). - Stefano Spezia, Apr 24 2024
EXAMPLE
64--65--66--67--68--69--70--71--72
|
63 36--37--38--39--40--41--42
| | |
62 35 16--17--18--19--20 43
| | | | |
61 34 15 4---5---6 21 44
| | | | | | |
60 33 14 3 0 7 22 45
| | | | | | | |
59 32 13 2---1 8 23 46
| | | | | |
58 31 12--11--10---9 24 47
| | | |
57 30--29--28--27--26--25 48
| |
56--55--54--53--52--51--50--49
MAPLE
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {0, 6, 20}, 40] (* Harvey P. Dale, Aug 11 2011 *)
Table[2 n (2 n + 1), {n, 0, 40}] (* Harvey P. Dale, Aug 11 2011 *)
PROG
(PARI) a(n)=2*n*(2*n+1) \\ Charles R Greathouse IV, Nov 20 2012
(Magma) [ 4*n^2+2*n: n in [0..50]]; // Vincenzo Librandi, Nov 25 2012
(Haskell)
a002943 n = 2 * n * (2 * n + 1) -- Reinhard Zumkeller, Jan 12 2014
CROSSREFS
Cf. A001477, A007395, A007494, A007742, A014105, A016813, A033954, A045896, A046092, A054000, A118729, A173511.
Same as A033951 except start at 0.
Sequences from spirals: A001107, A002939, A007742, A033951, A033952, A033953, A033954, A033989, A033990, A033991, this sequence, A033996, A033988.
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, this sequence = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
Formula fixed by Reinhard Zumkeller, Apr 09 2010
STATUS
approved