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

A359080 Numbers k such that A246600(k) = A000005(k).

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 23, 27, 29, 31, 37, 41, 43, 47, 51, 53, 59, 61, 63, 67, 71, 73, 79, 83, 85, 89, 95, 97, 101, 103, 107, 109, 111, 113, 119, 123, 125, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 173, 179, 181, 187, 191, 193, 197, 199, 211, 219
Offset: 1

Views

Author

Amiram Eldar, Dec 15 2022

Keywords

Comments

Numbers k such that for all the divisors d of k the bitwise OR of k and d is equal to k (or equivalently, the bitwise AND of k and d is equal to d).
Subsequence of A102553. Terms of A102553 that are not in this sequence: 2, 135, 175, 243, 343, ... .
All the terms are odd since if k is even and d = 1 then bitor(k, 1) > k and thus A246600(k) < A000005(k).
All the odd primes are terms.
All the numbers of the form 2^k-1 (A000225) are terms.
Numbers k such that the bitwise OR(k, d_1, d_2, ..., d_m) = k, where d_1, ..., d_m are the divisors of k. - Chai Wah Wu, Dec 18 2022

Crossrefs

Subsequence of A102553.
Subsequences: A000225, A065091.

Programs

  • Mathematica
    s[n_] := DivisorSum[n, 1 &, BitAnd[n, #] == # &]; Select[Range[250], s[#] == DivisorSigma[0, #] &]
  • PARI
    is(n) = sumdiv(n, d, bitor(d, n) == n) == numdiv(n);
    
  • Python
    from itertools import count, islice
    from operator import ior
    from functools import reduce
    from sympy import divisors
    def A359080_gen(startvalue=1):  # generator of terms >= startvalue
        return filter(
            lambda n: n | reduce(ior, divisors(n, generator=True)) == n,
            count(max(startvalue, 1)),
        )
    A359080_list = list(islice(A359080_gen(), 20))  # Chai Wah Wu, Dec 18 2022
    print(A359080_list)

A102550 Number of distinct prime-factors of n that are bitwise covered by n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 14 2005

Keywords

Comments

p is bitwise covered by n iff (p = (n AND p)) bitwise: A080099(n,p)=p.

Crossrefs

Programs

  • Mathematica
    a[1] = 0; a[k_] := Module[{f=FactorInteger[k][[;; , 1]]}, Count[BitAnd[k, f]-f, 0]];  Array[a,120] (* Amiram Eldar, Feb 06 2019 *)

Formula

a(A102553(n)) = A001221(A102553(n));
a(A102554(n)) < A001221(A102554(n));
a(A102551(n)) = 0, a(A102551(n)) > 0;
a(A102555(n)) = n;
a(m) < n for m < A102555(n).
a(n) = Sum_{p|n} (binomial(n,p) mod 2), where p is a prime. - Ridouane Oudra, May 03 2019

Extensions

Offset 1 from Amiram Eldar, Feb 06 2019

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

A309274 Ackermann Coding (BIT predicate) of transitive hereditarily finite sets.

Original entry on oeis.org

0, 1, 3, 7, 11, 15, 23, 31, 39, 47, 55, 63, 71, 79, 87, 95, 103, 111, 119, 127, 135, 143, 151, 159, 167, 175, 183, 191, 199, 207, 215, 223, 231, 239, 247, 255, 267, 271, 287, 303, 319, 335, 351, 367, 383, 399, 415, 431, 447, 463, 479, 495, 511, 523, 527, 543
Offset: 1

Views

Author

Christophe Papazian, Jul 24 2019

Keywords

Comments

If the representation of a(n) in base 2 contains the k-th bit (2^k), then it must contain the bits of k.
A034797 is a subsequence, and can be seen as a recursive variant of this sequence. - Rémy Sigrist, Jul 25 2019

Examples

			23 is in the sequence because 23 = 2^4 + 2^2 + 2^1 + 2^0 encodes the transitive set {0,1,{1},{{1}}} (remember that 0 is the empty set and 1 is {0}).
		

Crossrefs

Programs

  • Mathematica
    b[n_] := (Flatten @ Position[Reverse[IntegerDigits[n, 2]], 1] - 1);
    okQ[n_] := With[{bb = b[n]}, AllTrue[b /@ bb, Intersection[bb, #] == #&]];
    Select[Range[0, 600], okQ] (* Jean-François Alcover, Jul 25 2019 *)
  • PARI
    is(n) = { for (b=0, #binary(n), if (bittest(n, b), if (bitand(n, b)!=b, return (0)))); return (1) } \\ Rémy Sigrist, Jul 25 2019

A355670 Numbers k such that A246600(k) < A000005(k).

Original entry on oeis.org

2, 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
Offset: 1

Views

Author

Chai Wah Wu, Dec 19 2022

Keywords

Comments

Numbers k such that bitwise OR(k, d_1, d_2, ... d_m) > k where d_1, ..., d_m are the divisors of k.
Complement of A359080.
First 21 terms coincide with A336376.
A102554 is a subsequence; this sequence contains 1, 135, 175, 243, 343, 351, 363, ... which are not in A102554.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from operator import ior
    from functools import reduce
    from sympy import divisors
    def A355670_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:n|reduce(ior,divisors(n,generator=True))>n,count(max(startvalue,1)))
    A355670_list = list(islice(A355670_gen(), 20))
Showing 1-5 of 5 results.