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.

A259182 a(n) = prime(n) if n prime otherwise 1.

Original entry on oeis.org

1, 3, 5, 1, 11, 1, 17, 1, 1, 1, 31, 1, 41, 1, 1, 1, 59, 1, 67, 1, 1, 1, 83, 1, 1, 1, 1, 1, 109, 1, 127, 1, 1, 1, 1, 1, 157, 1, 1, 1, 179, 1, 191, 1, 1, 1, 211, 1, 1, 1, 1, 1, 241, 1, 1, 1, 1, 1, 277, 1, 283, 1, 1, 1, 1, 1, 331, 1, 1, 1, 353, 1, 367, 1, 1, 1, 1
Offset: 1

Views

Author

Vincenzo Librandi, Jun 20 2015

Keywords

Comments

The subsequence of prime terms is A006450.

Examples

			a(7) = 17 because prime(7) = 17 is prime.
a(8) = 1 because 8 is not prime.
		

Crossrefs

Programs

  • Magma
    [IsPrime(n) select NthPrime(n) else 1: n in [1..100]];
  • Mathematica
    Table[If[! PrimeQ[n], 1, Prime[n]], {n, 100}]
Showing 1-1 of 1 results.