cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A176624 a(n) = prime(n) + n*(-1)^n.

Original entry on oeis.org

1, 5, 2, 11, 6, 19, 10, 27, 14, 39, 20, 49, 28, 57, 32, 69, 42, 79, 48, 91, 52, 101, 60, 113, 72, 127, 76, 135, 80, 143, 96, 163, 104, 173, 114, 187, 120, 201, 128, 213, 138, 223, 148, 237, 152, 245, 164, 271, 178, 279, 182, 291, 188, 305, 202, 319, 212, 329, 218
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 22 2010

Keywords

Examples

			a(1)=1 because prime(1) + 1*(-1)^1 = 1.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n) +(-1)^n*n: n in [1..60]]; // G. C. Greubel, Jul 01 2021
    
  • Maple
    A176624 := proc(n) ithprime(n)+n*(-1)^n ; end proc: seq(A176624(n),n=1..120) ; # R. J. Mathar, Apr 27 2010
  • Mathematica
    Table[Prime[n]+(-1)^n*n, {n,60}] (* G. C. Greubel, Jul 01 2021 *)
  • Sage
    [nth_prime(n) +(-1)^n*n for n in (1..60)] # G. C. Greubel, Jul 01 2021

Formula

a(n) = A000040(n) + A038608(n+1).

Extensions

Entries checked by R. J. Mathar, Apr 27 2010
Showing 1-1 of 1 results.