A326644 Number of subsets of {1..n} containing n whose mean and geometric mean are both integers.
0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 1, 3, 1, 7, 1, 1, 1, 1, 1, 6, 5, 1, 23, 1, 1, 1, 1, 28, 1, 1, 1, 38, 1, 1, 1, 5, 1, 1, 1, 1, 6, 1, 1, 81, 8, 28, 1, 1, 1, 126, 1, 6, 1, 1, 1, 37, 1, 1, 6, 208, 1, 1, 1, 1, 1, 1, 1, 351, 1, 1, 381, 1, 1, 1, 1, 159, 605, 1, 1, 9, 1, 1, 1, 2, 1, 1223, 1, 1, 1, 1, 1, 805, 1, 113, 2, 5021, 1, 1, 1, 2, 1, 1, 1, 2630, 1, 1, 1, 54, 1, 1, 1, 1, 2, 1, 1
Offset: 0
Keywords
Examples
The a(1) = 1 through a(12) = 3 subsets: {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {2,8} {1,9} {3,6,12} {3,4,9,12} The a(18) = 7 subsets: {18} {2,18} {8,18} {1,8,9,18} {2,3,8,9,18} {6,12,16,18} {2,3,4,9,12,18}
Links
- Wikipedia, Geometric mean
Crossrefs
Programs
-
Mathematica
Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&IntegerQ[Mean[#]]&&IntegerQ[GeometricMean[#]]&]],{n,0,10}]
Extensions
More terms from David Wasserman, Aug 03 2019