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.

A259175 a(n) = 1 if n prime, otherwise prime(n).

Original entry on oeis.org

2, 1, 1, 7, 1, 13, 1, 19, 23, 29, 1, 37, 1, 43, 47, 53, 1, 61, 1, 71, 73, 79, 1, 89, 97, 101, 103, 107, 1, 113, 1, 131, 137, 139, 149, 151, 1, 163, 167, 173, 1, 181, 1, 193, 197, 199, 1, 223, 227, 229, 233, 239, 1, 251, 257, 263, 269, 271, 1, 281, 1, 293, 307, 311
Offset: 1

Views

Author

Vincenzo Librandi, Jun 20 2015

Keywords

Comments

The subsequence of prime terms is A007821. - Michel Marcus, Jun 20 2015

Examples

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

Crossrefs

Programs

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