A270875 Number of subsets of {1,...,n} with sum of elements equal to least common multiple of elements and at least two elements.
0, 0, 1, 1, 1, 2, 2, 3, 5, 6, 6, 9, 9, 10, 13, 15, 15, 19, 19, 33, 35, 35, 35, 47, 47, 47, 50, 57, 57, 101, 101, 106, 108, 108, 108, 127, 127, 127, 128, 249, 249, 268, 268, 272, 358, 358, 358, 406, 406, 408, 409, 411, 411, 424, 424, 501, 502, 502, 502, 1190, 1190
Offset: 1
Keywords
Examples
For n=3, the subsets of {1,2,3} with at least two elements have (sum,LCM) as follows: {1,2}->(3,2), {1,3}->(4,3), {2,3}->(5,6), {1,2,3}->(6,6). Only the last satisfies sum=LCM, so a(3)=1.
Crossrefs
Cf. A270970 (similar sequence counting trivial solutions).
Programs
-
Mathematica
Table[Length[Transpose@ {Total /@ #, LCM @@@ #} /. {a_, b_} /; a != b -> Nothing &@ Rest[Subsets[Range@ n] /. {} -> Nothing]], {n, 2, 22}] (* _Michael De Vlieger, Mar 24 2016 *)
-
PARI
a(n) = {nb = 0; S = vector(n, k, k); for (i = 0, 2^n - 1, ss = vecextract(S, i); if (vecsum(ss) == lcm(ss), nb++);); nb - n;} \\ Michel Marcus, Mar 26 2016
Formula
a(n) = A270970(n) - n. - Michel Marcus, Mar 27 2016
Extensions
More terms added using A270970 by Jinyuan Wang, May 02 2020
Comments