

A120882


a(n) = number of k's, for 1 <= k <= n, where GCD(k,floor(n/k)) = 1.


3



1, 2, 3, 3, 4, 6, 7, 6, 6, 8, 9, 10, 11, 13, 14, 12, 13, 14, 15, 15, 17, 19, 20, 19, 19, 21, 20, 20, 21, 27, 28, 25, 26, 28, 29, 28, 29, 31, 33, 31, 32, 36, 37, 37, 36, 38, 39, 37, 37, 38, 39, 39, 40, 40, 42, 41, 43, 45, 46, 49, 50, 52, 52, 48, 49, 54, 55, 55, 56, 60, 61, 57, 58
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

A120881(n) + A120882(n) = n.


LINKS

Table of n, a(n) for n=1..73.


EXAMPLE

For n = 8, we have the pairs {k,floor(n/k)} of {1,8},{2,4},{3,2},{4,2},{5,1},{6,1},{7,1},{8,1}. From these pairs we get the GCD's of 1,2,1,2,1,1,1,1. 6 of these GCD's are = 1. So a(8) = 6.


MAPLE

a:=proc(n) local ct, k: ct:=0: for k from 1 to n do if gcd(k, floor(n/k))=1 then ct:=ct+1 else ct:=ct: fi: od: ct; end: seq(a(n), n=1..85); # Emeric Deutsch, Jul 24 2006


MATHEMATICA

Table[Length[Select[Table[GCD[k, Floor[n/k]], {k, 1, n}], # == 1 &]], {n, 1, 80}] (* Stefan Steinerberger, Jul 23 2006 *)


CROSSREFS

Cf. A120881.
Sequence in context: A162627 A188215 A023158 * A102187 A133610 A256211
Adjacent sequences: A120879 A120880 A120881 * A120883 A120884 A120885


KEYWORD

nonn


AUTHOR

Leroy Quet, Jul 12 2006


EXTENSIONS

More terms from Emeric Deutsch, Stefan Steinerberger and Ryan Propper, Jul 23 2006


STATUS

approved



