login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A018252 The nonprime numbers (1 together with the composite numbers, A002808). 246
1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

d(a(n)) != 2 (cf. A000005). - Juri-Stepan Gerasimov, Oct 17 2009

Number of prime divisors of a(n) (counted with multiplicity) != 1. - Juri-Stepan Gerasimov, Oct 30 2009

Largest nonprime < n-th composite. - Juri-Stepan Gerasimov, Oct 29 2009

The nonnegative nonprimes A141468 without zero; the natural nonprimes; the whole nonprimes; the counting nonprimes. If the nonprime numbers A141468 which are also the nonnegative integers A001477, then the nonprimes A141468 also called the nonnegative nonprimes. If the nonprime numbers A018252 which are also the natural (or whole or counting) numbers A000027, then the nonprimes A018252 also called the natural nonprimes, the whole nonprimes and the counting nonprimes. - Juri-Stepan Gerasimov, Nov 22 2009

Smallest nonprime > n-th nonnegative nonprime. - Juri-Stepan Gerasimov, Dec 04 2009

a(n) = A175944(A014284(n)) = A175944(A175965(n)). - Reinhard Zumkeller, Mar 18 2011

REFERENCES

G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 2.

LINKS

N. J. A. Sloane, List of nonprimes up to 20000: Table of n, a(n) for n = 1..17738

Eric Weisstein's World of Mathematics, Monica Set

Eric Weisstein's World of Mathematics, Suzanne Set

Index entries for "core" sequences

FORMULA

Let b(0) = n + pi(n) and b(n+1) = n + pi(b(n)), with pi(n) = A000720(n); then a(n) is the limit value of b(n). - Floor van Lamoen, Oct 08 2001

a(n) = A137621(A137624(n)). - Reinhard Zumkeller, Jan 30 2008

A010051(a(n)) = 0. - Reinhard Zumkeller, Mar 31 2014

A239968(a(n)) = n. - Reinhard Zumkeller, Dec 02 2014

MAPLE

with(numtheory); sort(convert(convert([ seq(i, i=1..541) ], set) minus convert([ seq(ithprime(i), i=1..100) ], set), list));

seq(`if`(not isprime(n), n, NULL), n=1..88); # Peter Luschny, Jul 29 2009

A018252 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do; end if; end proc: # R. J. Mathar, Oct 22 2010

MATHEMATICA

nonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n + PrimePi@ n]; Array[ nonPrime, 75] (* Robert G. Wilson v, Jan 29 2015, based on the algorithm by Labos Elemer in A006508 *)

max = 90; Complement[Range[max], Prime[Range[PrimePi[max]]]] (* Harvey P. Dale, Aug 12 2011 *)

PROG

(MAGMA) [n : n in [1..100] | not IsPrime(n) ];

(PARI) isA018252(n) = !isprime(n)

A018252(n) = {local(a, b); b=n; a=1; while(a!=b, a=b; b=n+primepi(a)); b} \\ Michael B. Porter, Nov 06 2009

(Sage)

def A018252_list(n) :

    return [k for k in (1..n) if not k.is_prime()]

A018252_list(88)  # Peter Luschny, Feb 03 2012

(Haskell)

a018252 n = a018252_list !! (n-1)

a018252_list = filter ((== 0) . a010051) [1..]

-- Reinhard Zumkeller, Mar 31 2014

CROSSREFS

Cf. A000040 (complement), A002808.

Cf. A000005, A001222, A141468.

Boustrophedon transforms: A230955, A230954.

Cf. A010051, A239968.

Sequence in context: A088224 A002808 * A141468 A140209 A140347 A077091

Adjacent sequences:  A018249 A018250 A018251 * A018253 A018254 A018255

KEYWORD

nonn,nice,easy,core

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified January 23 21:40 EST 2017. Contains 281216 sequences.