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
Alois P. Heinz, Table of n, a(n) for n = 0..200
Wikipedia, Factorial number system.
FORMULA
For n > 1, a(2n-1) = n * a(2n-2) = (n^2-1) * a(2n-3). - Jon Perry, Nov 15 2012
a(n) = (n - N)! * N! * (N + 2), where N = floor(n/2), for n > 0. - Peter Luschny, Jul 01 2024
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:
seq(a(n), n=0..30); # Alois P. Heinz, Nov 15 2012
A219024 := proc(n) iquo(n, 2); ifelse(n = 0, 1, (n - %)! * %! *(% + 2)) end:
seq(A219024(n), n = 0..24); # Peter Luschny, Jul 01 2024
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
Joerg Arndt, Nov 10 2012
STATUS
approved