A154886
Number of ways to partition n into reduced fractions i/j with j <= n.
Original entry on oeis.org
1, 5, 51, 655, 20980, 578779, 46097340, 2889706132, 485416306983, 68334145684271, 24330218582223815, 3847311627258606534, 2716890193805515507433, 1270766589764097820833691, 2188031110546839992589840986, 1331298554328475793875243619997
Offset: 1
a(2) = #{2, 3/2+1/2, 1+1, 1+1/2+1/2, 1/2+1/2+1/2+1/2} = 5.
-
modifiedFarey[n_] := Union@ Flatten@ Table[a/b, {b, n}, {a, b*n}]; t[n_, k_] := Length@ IntegerPartitions[n, {k}, modifiedFarey@ n]; Plus @@@ Table[t[n, k], {n, 7, 7}, {k, n*(Plus @@ EulerPhi@ Range@n)}] (* Robert G. Wilson v, Aug 30 2010 *)
A154888
Number of ways to partition 1 into distinct reduced fractions i/j with j <= n.
Original entry on oeis.org
1, 1, 2, 3, 5, 7, 11, 16, 24, 37, 48, 71, 88, 133, 284, 435, 472, 773, 826, 1835, 4369, 5546, 5649, 9924, 16465, 19944, 32324, 75913, 76168, 140802, 141141, 238514, 537697, 598296, 2556065, 4674085, 4674844, 4985386, 9716587, 23983712, 23984971, 48523606, 48525215
Offset: 1
a(6) = #[1, 5/6+1/6, 4/5+1/5, 3/4+1/4, 2/3+1/3, 3/5+2/5, 1/2+1/3+1/6] = 7.
-
Farey[n_] := Union@ Flatten@ Table[ a/b, {b, n}, {a, b}]; t[n_, k_] := t[n, k] = Block[{c = j = 0, ip = IntegerPartitions[1, {k}, Farey@ n]}, len = 1 + Length@ ip; While[j < len, If[Plus @@ Union@ ip[[j]] == 1, c++ ]; j++ ]; c]; f[n_] := Plus @@ Table[ t[n, k], {k, Ceiling[n/2]}]; Array[f, 24] (* Robert G. Wilson v, Aug 30 2010 *)
A290474
Number of fractional partitions of n where each element of a partition is a rational number r/s such that r < s, s <= n, and gcd(r,s) = 1.
Original entry on oeis.org
1, 0, 1, 12, 135, 4477, 100160, 8663934, 485380025, 80730951180, 10180011676356, 4126137351376215, 563950787766342780, 456369006693283278869, 200330760220853808357439, 335435016971402890883460861, 197675615401466868237710861644, 561969529551274362018496511765678
Offset: 0
For n=3, the number of partitions is equal to the number of nonnegative integer solutions for the equation: (1/2)*x_1 + (1/3)*x_2 + (2/3)*x_3 = 3. The set S of solutions is {[0,1,4], [0,3,3], [0,5,2], [0,7,1], [0,9,0], [2,0,3], [2,2,2], [2,4,1], [2,6,0], [4,1,1], [4,3,0], [6,0,0]}. Therefore, |S| = a(3) = 12.
-
s(v, n, t) = {if(t==#v, f = n\v[t]; v[t]*f == n, sum(i=0, n\v[t], s(v, n-v[t]*i, t+1)))}
a(n) = {if(n<=2, return(n-1)); my(fractions = List(), q = 0); for(i=2, n, for(j=1, i-1, if(gcd(i, j)==1, listput(fractions, j/i)))); s(fractions, n, 1)} \\ David A. Corneth, Aug 03 2017
Showing 1-3 of 3 results.
Comments