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!)
A014693 In sequence of prime numbers add 1 to first number, 2 to 3rd number, 3 to 5th number, ... then subtract 1 from 2nd number, 2 from 4th number, 3 from 6th number and so on. 1
3, 2, 7, 5, 14, 10, 21, 15, 28, 24, 37, 31, 48, 36, 55, 45, 68, 52, 77, 61, 84, 68, 95, 77, 110, 88, 117, 93, 124, 98, 143, 115, 154, 122, 167, 133, 176, 144, 187, 153, 200, 160, 213, 171, 220, 176, 235, 199, 252, 204, 259, 213, 268, 224, 285, 235, 298, 242, 307 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..10000

PROG

(PARI) a(n) = if (n % 2, prime(n) + ceil(n/2), prime(n) - ceil(n/2)); \\ Michel Marcus, Nov 18 2018

(MAGMA) [IsOdd(n) select (NthPrime(n)+Ceiling(n/2)) else (NthPrime(n)- Ceiling(n/2)): n in [1..70]]; // Vincenzo Librandi, Nov 18 2018

CROSSREFS

Sequence in context: A292204 A292203 A295642 * A318783 A253564 A232751

Adjacent sequences:  A014690 A014691 A014692 * A014694 A014695 A014696

KEYWORD

nonn,easy

AUTHOR

Mohammad K. Azarian

EXTENSIONS

More terms from James A. Sellers

Title corrected by Sean A. Irvine, Nov 17 2018

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 June 14 20:21 EDT 2021. Contains 345038 sequences. (Running on oeis4.)