The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A046666 a(n) = n - (smallest prime dividing n). 8
0, 0, 2, 0, 4, 0, 6, 6, 8, 0, 10, 0, 12, 12, 14, 0, 16, 0, 18, 18, 20, 0, 22, 20, 24, 24, 26, 0, 28, 0, 30, 30, 32, 30, 34, 0, 36, 36, 38, 0, 40, 0, 42, 42, 44, 0, 46, 42, 48, 48, 50, 0, 52, 50, 54, 54, 56, 0, 58, 0, 60, 60, 62, 60, 64, 0, 66, 66, 68, 0, 70, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,3
COMMENTS
From Reinhard Zumkeller, Jul 08 2010: (Start)
a(n)=0 iff n is not composite;
for composite n: a(n) = max(m: m < n and gcd(m,n) > 1). (End)
LINKS
FORMULA
a(n) = n - A020639(n). - Michel Marcus, Jan 07 2015
MAPLE
with(numtheory):
a:= n-> n-min(factorset(n)[]):
seq(a(n), n=2..100); # Alois P. Heinz, Jan 07 2015
MATHEMATICA
Table[n-First@(First/@FactorInteger[n]), {n, 2, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 08 2011 *)
PROG
(PARI) a(n) = n - factor(n)[1, 1]; \\ Michel Marcus, Jan 07 2015
CROSSREFS
Sequence in context: A144775 A249744 A245075 * A276093 A176296 A349232
KEYWORD
nonn
AUTHOR
STATUS
approved

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 May 22 21:38 EDT 2024. Contains 372758 sequences. (Running on oeis4.)