login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A338848
Number of compositions (ordered partitions) of n into distinct powers of 3.
0
1, 1, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 2, 6, 0, 0, 0, 0, 2, 6, 0, 6, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 2, 6, 0, 0, 0, 0, 2, 6
OFFSET
0,5
FORMULA
a(n) = A039966(n) * A062756(n)!. - Kevin Ryde, Nov 14 2020
PROG
(PARI) a(n) = my(c=0, r); while(n, [n, r]=divrem(n, 3); if(r==2, return(0)); c+=r); c!; \\ Kevin Ryde, Nov 14 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Nov 11 2020
STATUS
approved