OFFSET
0,3
COMMENTS
Also, zero together with the third row of the square array A285357.
LINKS
Robert Israel, Table of n, a(n) for n = 0..2092
D. E. Knuth (Proposer), Problem 12005, Amer. Math. Monthly 124 (No. 8, Oct. 2017), page 755. For solution see op. cit., 126 (No. 7, 2019), 660-664.
Roberto Tauraso, Problem 12005, Proposed solution.
Index entries for linear recurrences with constant coefficients, signature (8,-24,34,-23,6).
FORMULA
a(n) = (1/4) * (3^(n+3) - 5*2^(n+4) + 4*n^2 + 26*n + 53). - Hugo Pfoertner, Mar 14 2018
G.f.: (x+3*x^2)/((1-x)^3*(1-2*x)*(1-3*x)). - Robert Israel, Mar 15 2018
EXAMPLE
For n=2 the 11 solutions are 12|32|44, 12|13|44, 12|33|44, 11|22|34, 11|23|43, 12|13|43, 12|32|42, 12|13|14, 12|32|34, 11|23|24, 11|23|44.
(Use the "interactive illustration" link in A285357 (with n=3!) for a graphic display.)
MAPLE
seq((1/4) * (3^(n+3) - 5*2^(n+4) + 4*n^2 + 26*n + 53), n=0..50); # Robert Israel, Mar 15 2018
MATHEMATICA
LinearRecurrence[{8, -24, 34, -23, 6}, {0, 1, 11, 64, 282}, 30] (* Vincenzo Librandi, Mar 16 2018 *)
PROG
(Magma) [(1/4)*(3^(n+3)-5*2^(n+4)+4*n^2+26*n+53): n in [0..30]]; // Vincenzo Librandi, Mar 16 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Don Knuth, Apr 17 2017
EXTENSIONS
a(10) from Hugo Pfoertner, Jan 17 2018
More terms from M. F. Hasler, Jan 21 2018
STATUS
approved