|
|
A219024
|
|
Number of length n mixed-radix numbers with base [2, 3, 4, ...] (factorial base) such that the parities of adjacent digits differ.
|
|
1
|
|
|
1, 2, 3, 6, 16, 48, 180, 720, 3456, 17280, 100800, 604800, 4147200, 29030400, 228614400, 1828915200, 16257024000, 146313216000, 1448500838400, 14485008384000, 158018273280000, 1738201006080000, 20713561989120000, 248562743869440000, 3212195459235840000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Leading zeros are permitted.
The base [2, 3, 4, ...] in the definition is sometimes called "rising factorial base". Using the "falling factorial base" [..., 4, 3, 2] gives the same sequence.
The number of such factorial numbers without any condition for the digit is (n+1)!.
|
|
LINKS
|
|
|
FORMULA
|
For n > 1, a(2n-1) = n * a(2n-2) = (n^2-1) * a(2n-3). - Jon Perry, Nov 15 2012
|
|
EXAMPLE
|
The a(4) = 16 such numbers are (dots for zeros):
[ 1] [ . 1 . 1 ]
[ 2] [ . 1 . 3 ]
[ 3] [ . 1 2 1 ]
[ 4] [ . 1 2 3 ]
[ 5] [ 1 . 1 . ]
[ 6] [ 1 . 1 2 ]
[ 7] [ 1 . 1 4 ]
[ 8] [ 1 . 3 . ]
[ 9] [ 1 . 3 2 ]
[10] [ 1 . 3 4 ]
[11] [ 1 2 1 . ]
[12] [ 1 2 1 2 ]
[13] [ 1 2 1 4 ]
[14] [ 1 2 3 . ]
[15] [ 1 2 3 2 ]
[16] [ 1 2 3 4 ]
|
|
MAPLE
|
a:= proc(n) option remember; `if`(n<4, 1+(5+(n-3)*n)*n/3,
(2*(n-6)*(n+1) *a(n-1)+ n*(n-1)*(n-2)*(n+3) *a(n-2))/
(4*(n-3)*(n+2)))
end:
|
|
MATHEMATICA
|
a[0] = 1; a[1] = 2; a[n_?EvenQ] = a[n] = n*(n+4)/(2*(n+2))*a[n-1]; a[n_?OddQ] := a[n] = (n+1)/2*a[n-1]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Apr 08 2015 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|