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!)
A113636 In the sequence of positive integers add 1 to each nonprime number. 0

%I #21 Nov 06 2020 03:55:42

%S 2,2,3,5,5,7,7,9,10,11,11,13,13,15,16,17,17,19,19,21,22,23,23,25,26,

%T 27,28,29,29,31,31,33,34,35,36,37,37,39,40,41,41,43,43,45,46,47,47,49,

%U 50,51,52,53,53,55,56,57,58,59,59,61,61,63,64,65,66,67,67,69,70,71,71,73

%N In the sequence of positive integers add 1 to each nonprime number.

%C This is the complement of sequence A014683.

%F a(n) = A014684(n) + 1. - _Bill McEachen_, Nov 01 2020

%t Array[# + Boole[! PrimeQ@ #] &, 72] (* _Michael De Vlieger_, Nov 05 2020 *)

%o (PARI) a(n) = if (!isprime(n), n+1, n); \\ _Michel Marcus_, Nov 06 2020

%Y Cf. A014683, A014684, A113523, A113638, A179278.

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Jan 15 2006

%E Offset 1 from _Michel Marcus_, Nov 06 2020

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 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)