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!)
A332003 Number of compositions (ordered partitions) of n into distinct parts having a common factor > 1 with n. 2
1, 0, 1, 1, 1, 1, 3, 1, 3, 3, 5, 1, 13, 1, 13, 7, 19, 1, 59, 1, 59, 15, 65, 1, 309, 5, 133, 27, 195, 1, 2883, 1, 435, 67, 617, 17, 4133, 1, 1177, 135, 2915, 1, 36647, 1, 3299, 1767, 4757, 1, 52045, 13, 21149, 619, 11307, 1, 187307, 69, 29467, 1179, 30461 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
LINKS
EXAMPLE
a(6) = 3 because we have [6], [4, 2] and [2, 4].
MAPLE
a:= proc(n) local b; b:=
proc(m, i, p) option remember; `if`(m=0, p!, `if`(i<1, 0,
b(m, i-1, p)+`if`(i>m or igcd(i, n)=1, 0, b(m-i, i-1, p+1))))
end; forget(b): b(n$2, 0)
end:
seq(a(n), n=0..63); # Alois P. Heinz, Feb 04 2020
MATHEMATICA
a[n_] := Module[{b}, b[m_, i_, p_] := b[m, i, p] = If[m == 0, p!, If[i < 1, 0, b[m, i - 1, p] + If[i > m || GCD[i, n] == 1, 0, b[m - i, i - 1, p + 1]]]]; b[n, n, 0]];
a /@ Range[0, 63] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A060241 A367951 A337983 * A145015 A085723 A186422
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 04 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 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)