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.

A202238 Characteristic function of positive integers not prime and not a power of 2.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1
Offset: 1

Views

Author

Michael Somos, Dec 16 2011

Keywords

Crossrefs

Programs

  • PARI
    {a(n) = n>0 && !isprime(n) && n != 2^valuation(n, 2)}
    
  • Python
    from sympy import isprime
    def A202238(n): return int(not isprime(n) and bool((n&-n)^n)) # Chai Wah Wu, Mar 11 2025

Formula

A111775(n) = 0 if and only if a(n) = 0.
A111787(n) = 0 if and only if a(n) = 0.
a(n) = 1 for n in A111774. - Michel Marcus, Aug 28 2017