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.

A276729 Number of nonprime digits in the decimal expansion of n.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Sep 16 2016

Keywords

Crossrefs

Cf. A011557 (integers that give records).

Programs

  • Maple
    f:= proc(n) local t; option remember;
      t:= n mod 10;
    procname((n-t)/10) + `if`(member(t,[2,3,5,7]),0,1)
    end proc:
    f(0):= 0:
    1,seq(f(i),i=1..100); # Robert Israel, Feb 27 2019
  • PARI
    a(n)=#select(t->!isprime(t),digits(n))

Formula

a(n) = A055642(n) - A193238(n).
a(A046034(n)) = 0. - Gordon Atkinson, Sep 06 2019