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!)
A085271 Difference between n-th composite number and its smallest prime divisor. 4

%I #16 Jun 20 2019 17:40:40

%S 2,4,6,6,8,10,12,12,14,16,18,18,20,22,20,24,24,26,28,30,30,32,30,34,

%T 36,36,38,40,42,42,44,46,42,48,48,50,52,50,54,54,56,58,60,60,62,60,64,

%U 66,66,68,70,72,72,74,70,76,78,78,80,82,80,84,84,86,88,84,90,90,92,90,94

%N Difference between n-th composite number and its smallest prime divisor.

%e For composite number 91 we have 91-7 = 84.

%t #-FactorInteger[#][[1,1]]&/@Complement[Range[2,200],Prime[Range[PrimePi[200]]]] (* _Harvey P. Dale_, Dec 11 2010 *)

%t #-Divisors[#][[2]]&/@Select[Range[4,200],!PrimeQ[#]&] (* _Zak Seidov_, Apr 09 2011 *)

%o (PARI) cminusp(n) = { for(x=2,n, forprime(p=2,floor(sqrt(x)), if(x%p==0,print1(x-p,","); break); ) ) }

%o (PARI){n=200;for(x=4,n,if(isprime(x),,print1(x-divisors(x)[2], ", ")))} \\ _Zak Seidov_, Apr 09 2011

%Y Cf. A002808, A085273.

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Aug 12 2003

%E Typo in data corrected by _Zak Seidov_, Apr 09 2011

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 16 14:17 EDT 2024. Contains 371740 sequences. (Running on oeis4.)