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.

A102554 Numbers k such that p <> (k AND p) for at least one prime-factor p.

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 16, 18, 20, 21, 22, 24, 25, 26, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 52, 54, 55, 56, 57, 58, 60, 62, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 86, 87, 88, 90, 91, 92, 93, 94, 96, 98, 99, 100, 102, 104
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 14 2005

Keywords

Comments

Numbers k such that A102550(k) < A001221(k).
Numbers k such that the bitwise OR of k and all prime factors of k is not equal to k. - Chai Wah Wu, Dec 18 2022

Crossrefs

Programs

  • Maple
    isA102554 := proc(n)
        local p;
        for p in numtheory[factorset](n) do
            if p <> ANDnos(p,n) then
                return true
            end if;
        end do:
        false ;
    end proc:
    for n from 1 to 500 do
        if isA102554(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Jan 20 2023
  • Python
    from itertools import count, islice
    from functools import reduce
    from operator import ior
    from sympy import primefactors
    def A102554_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda n:n|reduce(ior,primefactors(n))!=n,count(max(startvalue,2)))
    A102554_list = list(islice(A102554_gen(),20)) # Chai Wah Wu, Dec 18 2022