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-2 of 2 results.

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

A154386 Primes such that number of prime digits < number of nonprime digits.

Original entry on oeis.org

11, 19, 41, 61, 89, 101, 103, 107, 109, 113, 131, 139, 149, 151, 163, 167, 179, 181, 191, 193, 197, 199, 211, 241, 269, 281, 311, 349, 389, 401, 409, 419, 421, 431, 439, 443, 449, 461, 463, 467, 479, 487, 491, 499, 509, 541, 569, 599, 601, 607, 613, 617, 619
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 08 2009

Keywords

Comments

Intersection of A085558 and A000040. - Charles R Greathouse IV_, Mar 25 2010

Examples

			101 is prime, its nonprime digits are (1, 0, 1), and 0<3 so a(6)=101. 103 is prime, its prime digit is 3, its nonprime digits are (0, 1), and 1 < 2 so a(7)=103.
		

Programs

  • Maple
    a := proc (n) local nn, s, j: nn := convert(n, base, 10): s := 0: for j to nops(nn) do if isprime(nn[j]) = false then s := s+1 else s := s-1 end if end do: if isprime(n) = true and 0 < s then n else end if end proc: seq(a(n), n = 1 .. 650); # Emeric Deutsch, Jan 28 2009
Showing 1-2 of 2 results.