login
A120887
a(n) is the number of k's in 1..n such that gcd(k,ceiling(n/k)) = 1.
2
1, 2, 2, 3, 4, 5, 3, 4, 6, 8, 7, 8, 8, 9, 8, 8, 11, 12, 11, 12, 12, 13, 12, 13, 14, 16, 15, 18, 19, 20, 16, 17, 21, 21, 20, 21, 23, 24, 23, 24, 26, 27, 21, 22, 23, 24, 23, 24, 27, 29, 29, 29, 30, 31, 31, 32, 35, 36, 35, 36, 34, 35, 34, 37, 42, 43, 39, 40, 41, 41, 37, 38, 42, 43, 42
OFFSET
1,2
COMMENTS
A120886(n) + A120887(n) = n.
EXAMPLE
a(7)=3 because for k=1,2,...,7 we have gcd(k,ceiling(7/k))=1,2,3,2,1,2,1, respectively.
MAPLE
a:=proc(n) local ct, k: ct:=0: for k from 1 to n do if gcd(k, ceil(n/k))=1 then ct:=ct+1 else ct:=ct fi od: end: seq(a(n), n=1..85); # Emeric Deutsch, Jul 23 2006
MATHEMATICA
Table[Length[Select[Table[GCD[k, Ceiling[n/k]], {k, 1, n}], # == 1 &]], {n, 1, 80}] (* Stefan Steinerberger, Jul 23 2006 *)
CROSSREFS
Sequence in context: A072813 A285106 A369429 * A155860 A318285 A318560
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 12 2006
EXTENSIONS
More terms from Emeric Deutsch and Stefan Steinerberger Jul 23 2006
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 12 2007
STATUS
approved