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!)
A061228 a(1) = 2, a(n) = smallest number greater than n which is not coprime to n. 18

%I #26 Oct 26 2015 22:47:34

%S 2,4,6,6,10,8,14,10,12,12,22,14,26,16,18,18,34,20,38,22,24,24,46,26,

%T 30,28,30,30,58,32,62,34,36,36,40,38,74,40,42,42,82,44,86,46,48,48,94,

%U 50,56,52,54,54,106,56,60,58,60,60,118,62,122,64,66,66,70,68,134,70,72,72

%N a(1) = 2, a(n) = smallest number greater than n which is not coprime to n.

%H Reinhard Zumkeller, <a href="/A061228/b061228.txt">Table of n, a(n) for n = 1..10000</a>

%F a(2m) = 2m+2, a(p)= 2p if p is a prime.

%F a(n)= n + the smallest divisor (more than 1) of n.

%F a(p^k) = p^k + p if p is prime. - _Robert Israel_, Oct 21 2015

%e a(9) = 12 as 10 and 11 are coprime to 9. a(11) = 22 as 11 is a prime.

%p for n from 1 to 150 do if n=1 then printf(`%d,`,2); fi: for k from n+1 to 2*n do if igcd(n,k)>1 then printf(`%d,`,k); break; fi: od: od:

%p # alternative:

%p 2, seq(t + min(numtheory:-factorset(t)), t = 2..1000); # _Robert Israel_, Oct 21 2015

%t Table[n+First@(First/@FactorInteger[n]),{n,200}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 08 2011 *)

%o (Haskell)

%o a061228 n = n + a020639 n -- _Reinhard Zumkeller_, May 06 2015

%Y Cf. A046666, A064413. Equals A020639(n) + n.

%Y Cf. A070229, A256393.

%K nonn

%O 1,1

%A _Amarnath Murthy_, Apr 23 2001

%E More terms from _James A. Sellers_, Apr 24 2001

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 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)