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.

A380490 Replace prime digits of n by 0's.

Original entry on oeis.org

1, 0, 0, 4, 0, 6, 0, 8, 9, 10, 11, 10, 10, 14, 10, 16, 10, 18, 19, 0, 1, 0, 0, 4, 0, 6, 0, 8, 9, 0, 1, 0, 0, 4, 0, 6, 0, 8, 9, 40, 41, 40, 40, 44, 40, 46, 40, 48, 49, 0, 1, 0, 0, 4, 0, 6, 0, 8, 9, 60, 61, 60, 60, 64, 60, 66, 60, 68, 69, 0, 1, 0, 0, 4, 0, 6, 0, 8, 9, 80, 81, 80
Offset: 1

Views

Author

Ctibor O. Zizka, Jan 25 2025

Keywords

Examples

			n = 7: 7 --> 0, thus a(7) = 0.
n = 26: 26 --> 06, thus a(26) = 6.
n = 472: 472 --> 400, thus a(472) = 400.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(`if`(isprime(L[i]),0,L[i]) * 10^(i-1),i=1..nops(L))
    end proc:
    map(f, [$1..100]); # Robert Israel, May 18 2025
  • Mathematica
    a[n_] := FromDigits[IntegerDigits[n] /. ?PrimeQ -> 0]; Array[a, 100] (* _Amiram Eldar, Jan 25 2025 *)
  • Python
    def a(n): return int(str(n).translate({50:48,51:48,53:48,55:48}))
    print([a(n) for n in range(1, 83)]) # Michael S. Branicky, Jan 25 2025

Formula

a(A084984(n)) = A084984(n).
a(A046034(n)) = 0.