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.

A105441 Numbers with at least two odd prime factors (not necessarily distinct).

Original entry on oeis.org

9, 15, 18, 21, 25, 27, 30, 33, 35, 36, 39, 42, 45, 49, 50, 51, 54, 55, 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 09 2005

Keywords

Comments

Also polite numbers (A138591) that can be expressed as the sum of two or more consecutive integers in more than one ways. For example 9=4+5 and 9=2+3+4. Also 15=7+8, 15=4+5+6 and 15=1+2+3+4+5. - Jayanta Basu, Apr 30 2013

Crossrefs

Complement of A093641; A093642 is a subsequence.

Programs

  • Haskell
    a105441 n = a105441_list !! (n-1)
    a105441_list = filter ((> 2) . a001227) [1..]
    -- Reinhard Zumkeller, May 01 2012
    
  • Mathematica
    opf3Q[n_]:=Count[Flatten[Table[First[#],{Last[#]}]&/@FactorInteger[n]], ?OddQ]>1 (* _Harvey P. Dale, Jun 13 2011 *)
  • PARI
    upTo(lim)=my(v=List(),p=7,m);forprime(q=8,lim,forstep(n=p+2,q-2,2,m=n;while(m<=lim,listput(v,m);m<<=1));p=q);forstep(n=p+2,lim,2,listput(v,n));vecsort(Vec(v)) \\ Charles R Greathouse IV, Aug 08 2011
    
  • PARI
    is(n)=n>>=valuation(n,2); !isprime(n) && n>1 \\ Charles R Greathouse IV, Apr 30 2013
    
  • Python
    from sympy import primepi
    def A105441(n):
        def f(x): return int(n+1+sum(primepi(x>>i) for i in range(x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Feb 02 2025

Formula

A087436(a(n)) > 1.
A001227(a(n)) > 2. [Reinhard Zumkeller, May 01 2012]

A093640 Number of divisors of n whose binary representation is contained in that of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 2, 4, 2, 6, 2, 4, 3, 5, 2, 4, 2, 6, 2, 4, 2, 8, 2, 4, 3, 6, 2, 6, 2, 6, 2, 4, 2, 6, 2, 4, 3, 8, 2, 4, 2, 6, 4, 4, 2, 10, 2, 4, 3, 6, 2, 6, 4, 8, 3, 4, 2, 9, 2, 4, 4, 7, 2, 4, 2, 6, 2, 4, 2, 8, 2, 4, 4, 6, 2, 6, 2, 10, 2, 4, 2, 6, 3, 4, 3, 8, 2, 8, 3, 6, 3, 4, 3, 12, 2, 4, 3, 6, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 07 2004

Keywords

Examples

			n = 18: divisors of 18: 1 = '1', 2 = '10', 3 = '11', 6 = '110', 9 = '1001' and 18 = '10010': four of them are binary substrings of '10010', therefore a(18) = 4.
		

Crossrefs

Programs

  • Haskell
    import Data.List (isInfixOf)
    a093640 n  = length [d | d <- [1..n], mod n d == 0,
                             show (a007088 d) `isInfixOf` show (a007088 n)]
    -- Reinhard Zumkeller, Jan 22 2012
    
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, StringContainsQ @@ IntegerString[{n, #}, 2] &]; Array[a, 100] (* Amiram Eldar, Jul 16 2022 *)
  • Python
    from sympy import divisors
    def a(n):
        s = bin(n)[2:]
        return sum(1 for d in divisors(n, generator=True) if bin(d)[2:] in s)
    print([a(n) for n in range(1, 102)]) # Michael S. Branicky, Jul 11 2022

Formula

a(n) > 1 for n>1.
a(p) = 2 for primes p.
a(A093641(n)) = A000005(A093641(n)).
a(A093642(n)) < A000005(A093642(n)).

A123345 Numbers containing all divisors in their binary representation.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 12 2006

Keywords

Crossrefs

Complement of A093642. Different from A093641.
Cf. A000040 (subsequence), A027750, A218388.

Programs

  • Haskell
    import Data.List (unfoldr, isInfixOf)
    a123345 n = a123345_list !! (n-1)
    a123345_list = filter
      (\x -> 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[100], q] (* Amiram Eldar, Jun 05 2022 *)
  • Python
    from sympy import divisors
    def ok(n):
        b = bin(n)[2:]
        return n and 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

A105442 Numbers with at least two odd prime factors (not necessarily distinct) such that in binary representation all divisors of n are contained in n.

Original entry on oeis.org

55, 215, 407, 1403, 1681, 3223, 3362, 3415, 6724, 13448, 13655, 15487, 25751, 80089, 146621, 160178, 218455, 237169, 320356, 445663, 464711, 474338, 873815, 948676, 1662743, 1897352, 1932377, 1975531, 2484187, 3223001, 3410639, 3872639
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 09 2005

Keywords

Comments

Intersection of A093641 and A105441;
A087436(a(n)) > 1.

Crossrefs

Showing 1-4 of 4 results.