login
A119868
Number of different values assumed by a/b+c/d as a,b,c,d range between 1 and n.
2
1, 6, 21, 44, 124, 158, 382, 558, 899, 1087, 2022, 2328, 3936, 4542, 5463, 6755, 10366, 11306, 16488, 18315, 21092, 23455, 32562, 34901, 43833, 47945, 56749, 61726, 80278, 83515, 106455, 117566, 129575, 139126, 156439, 164489, 203153, 216586, 235914, 249462
OFFSET
1,2
LINKS
EXAMPLE
a(2)=6 since we can obtain 6 values, i.e., {1, 3/2, 2, 5/2, 3, 4}.
MAPLE
fracs:= {1}:
A[1]:= 1:
for n from 2 to 100 do
fracs:= fracs union {seq(n/i, i=1..n-1)} union {seq(i/n, i=1..n-1)};
A[n]:= nops({seq(seq(fracs[i]+fracs[j], j=1..i), i=1..nops(fracs))});
od:
seq(A[n], n=1..100); # Robert Israel, Apr 26 2015
MATHEMATICA
Table[Length@Union@Flatten@Table[a/b + c/d, {a, n}, {b, n}, {c, n}, {d, n}], {n, 24}]
Table[Length[Union[#[[1]]/#[[2]]+#[[3]]/#[[4]]&/@Tuples[Range[n], {4}]]], {n, 25}] (* Harvey P. Dale, Mar 04 2013 *)
CROSSREFS
Cf. A119867.
Sequence in context: A272684 A180863 A180857 * A175729 A081266 A087863
KEYWORD
nonn
AUTHOR
Giovanni Resta, May 26 2006
EXTENSIONS
More terms from Harvey P. Dale, Mar 04 2013
a(31) to a(40) from Robert Israel, Apr 26 2015
STATUS
approved