OFFSET
1,1
COMMENTS
a(n) is also the surface ares of the n-th solid in the following recursive construction:
The first solid is a unit cube (hence a(1)=6).
To form the n-th solid from the (n-1)st solid, construct a row of 2n-1 cubes, then center the (n-1)st solid on top of this row. (For example, the second solid is a row of 3 unit cubes, with a single unit cube centered on top of the middle cube. This construction has surface area a(2)=18.)
The sequence provides all nonnegative integers m such that 2*m+13 is a square. - Bruno Berselli, Mar 01 2013
LINKS
Lara K. Pudwell, Stacking Blocks and Counting Permutations, Mathematics Magazine 83 (2010), 297-302.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 2n^2+6n-2.
From Bruno Berselli, Oct 29 2010: (Start)
G.f.: 2*x*(3-x^2)/(1-x)^3.
a(n) -3*a(n-1) +3*a(n-2) -a(n-3) = 0 for n>3.
Sum_{n>=1} 1/a(n) = 2/3 + Pi*tan(sqrt(13)*Pi/2)/(2*sqrt(13)). - Amiram Eldar, Dec 23 2022
EXAMPLE
For n=1, the permutations of {1,1,2,2} avoiding the patterns {132, 231, 2134} are {1122, 1212, 1221, 2112, 2121, 2211}.
For n=2, the permutations of {1,1,2,2,3,3} avoiding the patterns {132, 231, 2134} are {112233, 121233, 122133, 211233, 212133, 221133, 311223, 312123, 312213, 321123, 321213, 322113, 331122, 331212, 331221, 332112, 332121, 332211}.
MATHEMATICA
a[n_] := 2*n^2 + 6*n - 2; Array[a, 60] (* Amiram Eldar, Dec 23 2022 *)
LinearRecurrence[{3, -3, 1}, {6, 18, 34}, 50] (* Harvey P. Dale, May 10 2023 *)
PROG
(PARI) a(n)=2*n^2+6*n-2 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lara Pudwell, Oct 25 2010
STATUS
approved