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!)
A163643 a(0)=1. For n >= 1, a(n) is the smallest composite integer that is > a(n-1) and that is coprime to n. 4

%I #18 Jul 24 2017 11:55:02

%S 1,4,9,10,15,16,25,26,27,28,33,34,35,36,39,44,45,46,49,50,51,52,57,58,

%T 65,66,69,70,75,76,77,78,81,82,87,88,91,92,93,94,99,100,115,116,117,

%U 118,119,120,121,122,123,124,125,126,133,134,135,136,141,142,143,144,145

%N a(0)=1. For n >= 1, a(n) is the smallest composite integer that is > a(n-1) and that is coprime to n.

%H Michael De Vlieger, <a href="/A163643/b163643.txt">Table of n, a(n) for n = 0..10000</a>

%p A163643 := proc(n) if n = 0 then 1; else for a from procname(n-1)+1 do if not isprime(a) then if gcd(a,n) = 1 then return a; end if; end if; end do: end if; end proc: seq(A163643(n),n=0..100) ; # _R. J. Mathar_, Oct 09 2010

%t a = {4}; Do[k = a[[n]] + 1; While[Nand[CompositeQ@ k, ! MemberQ[a, k], CoprimeQ[k, n + 1]], k++]; AppendTo[a, k], {n, 61}]; {1}~Join~a (* _Michael De Vlieger_, Jul 23 2017 *)

%Y Cf. A051884, A139558, A163642.

%K nonn,easy

%O 0,2

%A _Leroy Quet_, Aug 02 2009

%E More terms from _R. J. Mathar_, Oct 09 2010

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 March 28 04:13 EDT 2024. Contains 371235 sequences. (Running on oeis4.)