OFFSET
1,2
COMMENTS
The encoding of n is similar to A111095 but uses a double-factorial base A006882 to define the expansion coefficients.
The expansion coefficients b_k in n = sum_{k>=1} b_k * A006882(k) are defined "greedily" by taking the largest A006882(k) which is <=n, choosing b_k as large as possible such that b_k*A006882(k) remains <=n, subtracing b_k*A006882(k) from n to define a remainder, and recursively slicing the remainder to generate b_{k-1}, then b_{k-2} etc until the remainder reduces to zero. This produces the b_k for each n equivalent to A019513(n).
This representation A019513 is then scanned from the least to the most-significant b_k, i.e., along increasing k, and for each nonzero b_k, b_k copies of k are appended to a string representation -- starting from an empty string. This final representation is interpreted as a base-10 number a(n).
EXAMPLE
a(39) = 1455 because 1!!+4!!+5!!+5!! = 1+8+15+15 = 39
MAPLE
dblfactfloor := proc(n) local j ; for j from 1 do if doublefactorial(j) > n then return j-1 ; end if; end do: end proc:
dblfbase := proc(n) local nshf, L, f; nshf := n ; L := [] ; while nshf > 0 do f := dblfactfloor(nshf) ; L := [f, op(L)] ; nshf := nshf-doublefactorial(f) ; end do: L ; end proc:
read("transforms") ; A181521 := proc(n) digcatL(dblfbase(n)) ; end proc:
seq(A181521(n), n=1..70) ; # R. J. Mathar, Dec 06 2010
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Oct 26 2010
STATUS
approved