login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A331979 Number of compositions (ordered partitions) of n into distinct nontrivial divisors of n. 2
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 894, 0, 0, 0, 24, 0, 6, 0, 0, 0, 0, 0, 894, 0, 0, 0, 0, 0, 30, 0, 120, 0, 0, 0, 19518, 0, 0, 0, 0, 0, 126, 0, 0, 0, 0, 0, 18558, 0, 0, 0, 0, 0, 6, 0, 864 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,13
LINKS
EXAMPLE
a(12) = 6 because we have [6, 4, 2], [6, 2, 4], [4, 6, 2], [4, 2, 6], [2, 6, 4] and [2, 4, 6].
MAPLE
with(numtheory):
a:= proc(n) local b, l; l:= sort([(divisors(n) minus {1, n})[]]):
b:= proc(m, i, p) option remember; `if`(m=0, p!, `if`(i<1, 0,
b(m, i-1, p)+`if`(l[i]>m, 0, b(m-l[i], i-1, p+1))))
end; forget(b):
b(n, nops(l), 0)
end:
seq(a(n), n=0..100); # Alois P. Heinz, Feb 03 2020
MATHEMATICA
a[n_] := If[n == 0, 1, Module[{b, l = Divisors[n] ~Complement~ {1, n}}, b[m_, i_, p_] := b[m, i, p] = If[m == 0, p!, If[i < 1, 0, b[m, i-1, p] + If[l[[i]] > m, 0, b[m - l[[i]], i-1, p+1]]]]; b[n, Length[l], 0]]];
a /@ Range[0, 100] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A187794 A200214 A294887 * A005872 A035322 A270031
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 03 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 16:35 EDT 2024. Contains 371749 sequences. (Running on oeis4.)