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!)
A167482 a(n)=n-1 if n is prime, otherwise a(n)=n+1. 3
2, 1, 2, 5, 4, 7, 6, 9, 10, 11, 10, 13, 12, 15, 16, 17, 16, 19, 18, 21, 22, 23, 22, 25, 26, 27, 28, 29, 28, 31, 30, 33, 34, 35, 36, 37, 36, 39, 40, 41, 40, 43, 42, 45, 46, 47, 46, 49, 50, 51, 52, 53, 52, 55, 56, 57, 58, 59, 58, 61, 60, 63, 64, 65, 66, 67, 66, 69, 70, 71, 70, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
Table[If[PrimeQ[n], n-1, n+1], {n, 1, 200}]
CROSSREFS
Sequence in context: A084600 A216760 A318724 * A328601 A137327 A143913
KEYWORD
nonn
AUTHOR
Zak Seidov, Nov 04 2009
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 April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)