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

A080940 Smallest proper divisor of n which is a suffix of n in binary representation; a(n) = 0 if no such divisor exists.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 4, 1, 2, 1, 0, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 0, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 0, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 32, 1, 2, 1, 4, 1, 2, 1, 8
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 25 2003

Keywords

Comments

By definition, identical to A006519 except that a(2^k) = 0 for all k.
a(3*2^k)=2^k and a(m)<2^k for m<3*2^k (see A007283).
Also, the first repeating value of the periodic sequences created by 2^k mod n. - Alison J. McCrea, Apr 13 2025

Examples

			n=6='110', divisors<6: 1='1', 2='10' and 3='11', therefore a(6)=2='10';
n=7='111', divisors<7: 1='1', therefore a(7)=1;
n=8='1000', divisors<8: 1='1', 2='10' and 4='100', therefore a(8)=0.
		

Crossrefs

Programs

  • Haskell
    import Data.List (isPrefixOf); import Data.Function (on)
    a080940 n = if null ds then 0 else head ds  where
                ds = filter ((flip isPrefixOf `on` a030308_row) n) $
                            a027751_row n
    -- Reinhard Zumkeller, Mar 27 2014
    
  • Python
    def A080940(n): return (m:=n&-n)*(m!=n) # Chai Wah Wu, Jun 20 2023

Extensions

Definition improved by Reinhard Zumkeller, Mar 27 2014

A080942 Number of divisors of n that are also suffixes of n in binary representation.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 25 2003

Keywords

Comments

a(n) = 1 iff n = 2^k (A000079), the only divisor is n itself.
For a(n) > 1 the other trivial divisor is 1 for odd numbers and 2 for even numbers (A057716).

Examples

			n=63 has A000005(63)=6 divisors: 1='1', 3='11', 7='111', 9='1001', 21='10101' and 63='111111', {1,11,111,111111} are also suffixes of 111111, therefore a(63)=4.
		

Crossrefs

Programs

  • Haskell
    import Data.List (isPrefixOf); import Data.Function (on)
    a080942 n = length $
                filter ((flip isPrefixOf `on` a030308_row) n) $ a027750_row n
    -- Reinhard Zumkeller, Mar 27 2014
    
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Mod[n, 2^BitLength[#]] == # &]; Array[a, 100] (* Amiram Eldar, Apr 07 2023 *)
  • Python
    from sympy import divisors
    def A080942(n): return sum(1 for d in divisors(n,generator=True) if not (d^n)&((1<Chai Wah Wu, Jun 20 2023

Formula

a(A080943(n)) = 2.
a(A080945(n)) > 2.
a(A080946(n)) = 3.
a(A080947(n)) > 3.
a(n) <= A000005(n).
a(p) = 2 for odd primes p.
a(A080948(n)) = n and a(m) < n for m < A080948(n).

A080943 Numbers having exactly two divisors that are also suffixes in binary representation.

Original entry on oeis.org

3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 52, 53, 55, 56, 57, 58, 59, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 79, 80, 81, 82, 83, 84, 86, 88, 89, 91, 92
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 25 2003

Keywords

Comments

A080942(a(n))=2, the two divisors are n and 1 for odd numbers and 2 for even numbers.

Crossrefs

Programs

  • Haskell
    a080943 n = a080943_list !! (n-1)
    a080943_list = filter ((== 2) . a080942) [1..]
    -- Reinhard Zumkeller, Mar 27 2014
    
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A080943_gen(startvalue=3): # generator of terms >= startvalue
        return filter(lambda n:(m:=n&-n)!=n and all(d==m or d==n or (d^n)&((1<A080943_list = list(islice(A080943_gen(),20)) # Chai Wah Wu, Jun 20 2023

A080945 Numbers having more than two divisors that are also suffixes in binary representation.

Original entry on oeis.org

15, 27, 30, 39, 45, 51, 54, 60, 63, 75, 78, 85, 87, 90, 99, 102, 108, 111, 119, 120, 123, 125, 126, 135, 147, 150, 153, 156, 159, 165, 170, 171, 174, 175, 180, 183, 187, 195, 198, 204, 205, 207, 216, 219, 221, 222, 231, 238, 240, 243, 245, 246, 250, 252, 255
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 25 2003

Keywords

Comments

A080942(a(n))>2; complement of A080944;
A080942(a(n))-2 < A070824(a(n)).

Crossrefs

Programs

  • Haskell
    a080945 n = a080945_list !! (n-1)
    a080945_list = filter ((> 2) . a080942) [1..]
    -- Reinhard Zumkeller, Mar 27 2014

A080946 Numbers having exactly three divisors that are also suffixes in binary representation.

Original entry on oeis.org

15, 27, 30, 39, 45, 51, 54, 60, 75, 78, 85, 87, 90, 99, 102, 108, 111, 119, 120, 123, 125, 135, 147, 150, 153, 156, 159, 165, 170, 171, 174, 175, 180, 183, 187, 195, 198, 204, 205, 207, 216, 219, 221, 222, 238, 240, 243, 245, 246, 250, 267, 270, 279, 285, 287
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 25 2003

Keywords

Comments

A080942(a(n))=3.

Crossrefs

Programs

  • Haskell
    a080946 n = a080946_list !! (n-1)
    a080946_list = filter ((== 3) . a080942) [1..]
    -- Reinhard Zumkeller, Mar 27 2014

A080944 Numbers having only trivial divisors that are also suffixes in binary representation.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 52, 53, 55, 56, 57, 58, 59, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 79, 80, 81, 82, 83
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 25 2003

Keywords

Comments

A080942(a(n))<=2; union of powers of 2 (A000079) and A080943; complement of A080945.

Crossrefs

Programs

  • Haskell
    a080944 n = a080944_list !! (n-1)
    a080944_list = filter ((<= 2) . a080942) [1..]
    -- Reinhard Zumkeller, Mar 27 2014

A080947 Numbers having more than three divisors that are also suffixes in binary representation.

Original entry on oeis.org

63, 126, 231, 252, 255, 363, 399, 462, 495, 504, 510, 567, 627, 726, 735, 759, 798, 845, 891, 903, 924, 975, 990, 1008, 1020, 1023, 1071, 1134, 1215, 1239, 1254, 1365, 1407, 1419, 1452, 1455, 1470, 1518, 1575, 1596, 1690, 1695, 1743, 1755, 1782, 1806, 1848
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 25 2003

Keywords

Comments

A080942(a(n))>3.

Examples

			a(4) = 252: divisors(252) = {1, 2, 3, 4->'100', 6, 7, 9, 12->'1100', 14, 18, 21, 28->'11100', 36, 42, 63, 84, 126, 252->'11111100'}: A080946(252) = #{4, 12, 28, 252} = 4;
a(15) = 735: divisors(735) = {1->'1', 3->'11', 5, 7->'111', 15->'1111', 21, 35, 49, 105, 147, 245, 735->'1011011111'}: A080942(735) = #{1, 3, 7, 15, 735} = 5.
		

Crossrefs

Programs

  • Haskell
    a080947 n = a080947_list !! (n-1)
    a080947_list = filter ((> 3) . a080942) [1..]
    -- Reinhard Zumkeller, Mar 27 2014

A080948 Least number m having n divisors that are also suffixes of m in binary representation.

Original entry on oeis.org

1, 3, 15, 63, 735, 4095, 185535, 5810175, 1277603775
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 25 2003

Keywords

Comments

a(n) = Min{k: A080942(k)=n}; A080942(a(n)) = n.
2^32 < a(10) <= 12754994175. a(11) <= 5301966462975. - Donovan Johnson, Oct 28 2010

Examples

			a(1)=A000079(0)=1; a(2)=A080943(1)=3; a(3)=A080946(1)=15.
		

Crossrefs

Extensions

a(7)-a(9) from Donovan Johnson, Oct 28 2010
Showing 1-8 of 8 results.