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.

A131516 a(n)=1 if n is an odd prime number, otherwise, a(n)=n.

Original entry on oeis.org

0, 1, 2, 1, 4, 1, 6, 1, 8, 9, 10, 1, 12, 1, 14, 15, 16, 1, 18, 1, 20, 21, 22, 1, 24, 25, 26, 27, 28, 1, 30, 1, 32, 33, 34, 35, 36, 1, 38, 39, 40, 1, 42, 1, 44, 45, 46, 1, 48, 49, 50, 51, 52, 1, 54, 55, 56, 57, 58, 1, 60, 1, 62, 63, 64, 65, 66, 1, 68
Offset: 0

Views

Author

Mohammad K. Azarian, Aug 14 2007

Keywords

Programs

  • Mathematica
    Table[If[OddQ[n]&&PrimeQ[n],1,n],{n,0,68}] (* James C. McMahon, Feb 27 2025 *)
  • PARI
    a(n) = if ((n%2) && isprime(n), 1, n); \\ Michel Marcus, Nov 13 2013

Extensions

Offset corrected by Ivan Panchenko, Nov 13 2013