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.

A384427 Evil numbers that are not a multiple of any other evil number.

Original entry on oeis.org

3, 5, 17, 23, 29, 43, 53, 71, 77, 83, 89, 101, 113, 139, 149, 163, 169, 197, 209, 257, 263, 269, 277, 281, 287, 293, 311, 317, 329, 337, 343, 347, 349, 353, 359, 373, 383, 389, 401, 407, 413, 427, 449, 461, 467, 469, 479, 503, 509, 523, 533, 547, 553, 571, 593, 599
Offset: 1

Views

Author

Francisco J. Muñoz, May 28 2025

Keywords

Crossrefs

Union of A217790 and A027699.

Programs

  • Maple
    isevil:= proc(n) convert(convert(n,base,2),`+`)::even end proc:
    N:= 1000: # for terms <= N
    V:= Vector(N,1):
    for i from 1 to N do
        if isevil(i) then V[[seq(j,j=2*i .. N, i)]]:= 0
        else V[i]:= 0
        fi
    od:
    select(t -> V[t]=1, [$1..N]); # Robert Israel, Jun 18 2025
  • Mathematica
    evilQ[n_] := EvenQ[DigitCount[n, 2, 1]]; q[n_] := evilQ[n] && AllTrue[Divisors[n], # == n || ! evilQ[#] &]; Select[Range[600], q] (* Amiram Eldar, May 31 2025 *)
  • PARI
    isevil(n) = hammingweight(n) % 2 == 0;
    noevildiv(n) = {fordiv(n, d, if ((d < n) && isevil(d), return (0)); ); 1; }
    isok(n) = isevil(n) && noevildiv(n); \\ Michel Marcus, May 31 2025