OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..7141
Alois P. Heinz, Animation of a(10) = 74 permutations
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1).
FORMULA
EXAMPLE
a(5) = 14: 12345, 12354, 12435, 12453, 13245, 21345, 31245, 35421, 45321, 53421, 54213, 54231, 54312, 54321.
a(6) = 18: 123456, 123465, 123546, 123564, 124356, 132456, 213456, 213465, 312456, 465321, 564312, 564321, 645321, 653421, 654213, 654231, 654312, 654321.
MATHEMATICA
Join[{1, 1, 2, 6, 12}, LinearRecurrence[{1, 0, 0, 1}, {14, 18, 28, 42}, 40]] (* Jean-François Alcover, Oct 26 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Apr 07 2020
STATUS
approved