[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
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
OFFSET
1,1
LINKS
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
KEYWORD
nonn,easy
EXTENSIONS
More terms from James A. Sellers
Title corrected by Sean A. Irvine, Nov 17 2018
STATUS
approved