login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Antti Karttunen, Table of n, a(n) for n = 2..16385

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

Cf. A020639, A061228.

Sequence in context: A144775 A249744 A245075 * A276093 A176296 A194795

Adjacent sequences:  A046663 A046664 A046665 * A046667 A046668 A046669

KEYWORD

nonn

AUTHOR

N. J. A. Sloane

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 16 21:26 EST 2020. Contains 331975 sequences. (Running on oeis4.)