login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A120886 a(n) = number of k's with 1 <= k <= n where gcd(k,ceiling(n/k)) > 1. 1

%I #12 Jul 19 2020 11:52:59

%S 0,0,1,1,1,1,4,4,3,2,4,4,5,5,7,8,6,6,8,8,9,9,11,11,11,10,12,10,10,10,

%T 15,15,12,13,15,15,14,14,16,16,15,15,22,22,22,22,24,24,22,21,22,23,23,

%U 23,24,24,22,22,24,24,27,27,29,27,23,23,28,28,28,29,34,34,31,31,33,32,32

%N a(n) = number of k's with 1 <= k <= n where gcd(k,ceiling(n/k)) > 1.

%C a(n) + A120887(n) = n.

%e a(7)=4 because for k=1,2,...,7 we have gcd(k,ceiling(7/k))=1,2,3,2,1,2,1, respectively.

%p 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..87); # _Emeric Deutsch_, Jul 23 2006

%t Table[Length[Select[Table[GCD[k, Ceiling[n/k]], {k, 1, n}], # > 1 &]], {n, 1, 80}] (* _Stefan Steinerberger_, Jul 23 2006 *)

%Y Cf. A120887.

%K nonn

%O 1,7

%A _Leroy Quet_, Jul 12 2006

%E More terms from _Emeric Deutsch_ and _Stefan Steinerberger_, Jul 23 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 09:16 EDT 2024. Contains 371967 sequences. (Running on oeis4.)