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

A093642 Numbers not containing all divisors in their binary representation.

Original entry on oeis.org

9, 15, 18, 21, 25, 27, 30, 33, 35, 36, 39, 42, 45, 49, 50, 51, 54, 57, 60, 63, 65, 66, 69, 70, 72, 75, 77, 78, 81, 84, 85, 87, 90, 91, 93, 95, 98, 99, 100, 102, 105, 108, 110, 111, 114, 115, 117, 119, 120, 121, 123, 125, 126, 129, 130, 132, 133, 135, 138, 140, 141
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 07 2004

Keywords

Examples

			55 is not a member, as the binary representations of 5 ("101") and 11 ("1011") both appear in the binary representation of 55 ("110111").
		

Crossrefs

Complement of A123345.
Subsequence of A105441. - Reinhard Zumkeller, Apr 09 2005

Programs

  • Haskell
    import Data.List (unfoldr, isInfixOf)
    a093642 n = a093642_list !! (n-1)
    a093642_list = filter
      (\x -> not $ all (`isInfixOf` b x) $ map b $ a027750_row x) [1..] where
      b = unfoldr (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 2)
    -- Reinhard Zumkeller, Oct 27 2012
    
  • Mathematica
    q[n_] := !AllTrue[Divisors[n], StringContainsQ[IntegerString[n, 2], IntegerString[#, 2]] &]; Select[Range[150], q] (* Amiram Eldar, Jun 05 2022 *)
  • Python
    from sympy import divisors
    def ok(n):
        b = bin(n)[2:]
        return not all(bin(d)[2:] in b for d in divisors(n, generator=True))
    print([k for k in range(119) if ok(k)]) # Michael S. Branicky, Jun 05 2022

Formula

A093640(a(n)) < A000005(a(n)).

A218388 Bitwise OR of all divisors of n.

Original entry on oeis.org

1, 3, 3, 7, 5, 7, 7, 15, 11, 15, 11, 15, 13, 15, 15, 31, 17, 31, 19, 31, 23, 31, 23, 31, 29, 31, 27, 31, 29, 31, 31, 63, 43, 51, 39, 63, 37, 55, 47, 63, 41, 63, 43, 63, 47, 63, 47, 63, 55, 63, 51, 63, 53, 63, 63, 63, 59, 63, 59, 63, 61, 63, 63, 127, 77, 127
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 27 2012

Keywords

Comments

a(n) <= A003817(n); a(A000040(n)) = A000040(n).

Examples

			n=20: divisors(20) = {1, 2, 4, 5, 10, 20}, 00001 OR 00010 OR 00100 OR 00101 OR 01010 OR 10100 = 11111 -> a(20) = 31;
n=21: divisors(21) = {1, 3, 7, 21}, 00001 OR 00011 OR 00111 OR 10101 = 10111 -> a(21) = 23;
n=22: divisors(22) = {1, 2, 11, 22}, 00001 OR 00010 OR 01011 OR 10110 = 11111 -> a(22) = 31;
n=23: divisors(23) = {1, 23}, 00001 OR 10111 = 10111 -> a(23) = 23;
n=24: divisors(24) = {1, 2, 3, 4, 6, 8, 12, 24}, 00001 OR 00010 OR 00011 OR 00100 OR 00110 OR 01000 OR 01100 OR 11000 = 11111 -> a(24) = 31;
n=25: divisors(25) = {1, 5, 25}, 00001 OR 00101 OR 11001 = 11101 -> a(25) = 29.
		

Crossrefs

Cf. A027750, A000225 (subsequence), A123345, A218403.

Programs

  • Haskell
    import Data.Bits ((.|.))
    a218388 = foldl1 (.|.) . a027750_row :: Integer -> Integer
  • Mathematica
    Table[BitOr@@Divisors[n],{n,70}] (* Harvey P. Dale, Feb 27 2013 *)

A218403 Bitwise OR of all proper divisors of n; a(1) = 0 by convention.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 1, 7, 3, 7, 1, 7, 1, 7, 7, 15, 1, 15, 1, 15, 7, 11, 1, 15, 5, 15, 11, 15, 1, 15, 1, 31, 11, 19, 7, 31, 1, 19, 15, 31, 1, 31, 1, 31, 15, 23, 1, 31, 7, 31, 19, 31, 1, 31, 15, 31, 19, 31, 1, 31, 1, 31, 31, 63, 13, 63, 1, 55, 23, 47, 1, 63, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 28 2012

Keywords

Examples

			n=20: properDivisors(20) = {1, 2, 4, 5, 10}, 0001 OR 0010 OR 0100 OR 0101 OR 1010 = 1111 -> a(20) = 15;
n=21: properDivisors(21) = {1, 3, 7}, 001 OR 011 OR 111 = 111 -> a(21) = 7;
n=22: properDivisors(22) = {1, 2, 11}, 0001 OR 0010 OR 1011 = 1111 -> a(22) = 11;
n=23: properDivisors(23) = {1} -> a(23) = 23;
n=24: properDivisors(24) = {1, 2, 3, 4, 6, 8, 12}, 0001 OR 0010 OR 0011 OR 0100 OR 0110 OR 1000 OR 1100 = 1111 -> a(24) = 15;
n=25: properDivisors(25) = {1, 5}, 001 OR 101 = 101 -> a(25) = 5.
		

Crossrefs

Programs

  • Haskell
    import Data.Bits ((.|.))
    a218403 = foldl (.|.)  0 . a027751_row :: Integer -> Integer
    
  • Mathematica
    Table[BitOr@@Most[Divisors[n]],{n,80}] (* Harvey P. Dale, Nov 09 2012 *)
  • PARI
    A218403(n) = { my(s=0); fordiv(n,d,if(dAntti Karttunen, Oct 08 2017

Formula

a(n) <= A218388(n).
a(A000040(n)) = 1.
From Antti Karttunen, Oct 08 2017: (Start)
a(n) = A087207(A293214(n)).
A227320(n) <= a(n) <= A001065(n).
(End)

A162722 A positive integer k is included if when k is represented in binary, it contains the binary representations of every distinct prime dividing k as substrings, with overlapping of the substrings allowed (but not necessary).

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 19, 20, 22, 23, 24, 26, 27, 28, 29, 31, 32, 34, 37, 38, 40, 41, 43, 44, 45, 46, 47, 48, 52, 53, 54, 55, 56, 58, 59, 61, 62, 63, 64, 67, 68, 71, 73, 74, 75, 76, 79, 80, 82, 83, 86, 88, 89, 90, 92, 94, 96, 97, 101, 103, 104, 106, 107
Offset: 1

Views

Author

Leroy Quet, Jul 11 2009

Keywords

Comments

Every integer of the form p*2^k, p = prime, k>=0, is in this sequence. Every integer of the form p*2^k, p = odd prime, is missing from sequence A162721.

Examples

			20 in binary is 10100. The distinct primes dividing 20 are 2 and 5, which are 10 and 101 in binary. Both 10 and 101 occur in 10100 (with overlapping). So 20 is in this sequence.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := AllTrue[FactorInteger[n][[;; , 1]], StringContainsQ[IntegerString[n, 2], IntegerString[#, 2]] &]; Select[Range[2, 100], q] (* Amiram Eldar, Nov 10 2021 *)

Extensions

Corrected and extended by Sean A. Irvine, Dec 14 2009
Showing 1-4 of 4 results.