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

A175382 Positive integers n for which there is at least one positive integer k whose binary expansion occurs as a substring in the binary expansion of n but does not divide n.

Original entry on oeis.org

5, 7, 9, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85
Offset: 1

Views

Author

Leroy Quet, Apr 24 2010

Keywords

Comments

This is the complement of sequence A175381.
Includes all odd numbers > 3. - Robert Israel, Nov 25 2016

Examples

			14 in binary is 1110. One of the substrings of 1110 is 11, which is 3 in decimal. Since 3 does not divide 14, 14 is in this sequence.
		

Crossrefs

Cf. A175381.

Programs

  • Mathematica
    Select[Range@ 85, Function[n, Count[Map[IntegerDigits[#, 2] &, Complement[Range@ n, Divisors@ n]], k_ /; Length@ SequencePosition[IntegerDigits[n, 2], k] > 0] > 0]] (* Michael De Vlieger, Nov 24 2016, Version 10.1 *)

Extensions

Spelling corrected by Jason G. Wurtzel, Sep 04 2010
a(12)-a(56) from Lars Blomberg, May 05 2011
a(57)-a(66) from Nathaniel Johnston, May 05 2011

A383592 Positive integers k divisible by all positive integers whose decimal expansion appears as a substring of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 20, 22, 24, 30, 33, 36, 40, 44, 48, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99, 100, 110, 120, 150, 200, 210, 220, 240, 250, 300, 330, 360, 400, 420, 440, 480, 500, 510, 520, 550, 600, 630, 660, 700, 770, 800, 840, 880
Offset: 1

Views

Author

Rémy Sigrist, May 01 2025

Keywords

Comments

This sequence is infinite as ten times a term is also a term.
All terms are of the form A037124(k) or A037124(k) + d where k > 0 and d divides A037124(k) while having strictly less decimal digits as A037124(k).
Empirically, all terms have either one or two nonzero decimal digits.

Examples

			The number 240 is divisible by 2, 24, 240, 4 and 40, so 240 belongs to this sequence.
		

Crossrefs

Cf. A037124, A078546, A175381 (binary variant), A178157, A218978.

Programs

  • Mathematica
    Select[Range[880],AllTrue[#/Select[FromDigits/@Subsequences[IntegerDigits[#]],#>0&],IntegerQ]&] (* James C. McMahon, May 13 2025 *)
  • PARI
    is(n, base = 10) = {
        my (d = digits(n, base));
        for (i = 1, #d,
            if (d[i],
                for (j = i, #d,
                    if (n % fromdigits(d[i..j], base),
                        return (0);););););
        return (1); }
    
  • PARI
    \\ See Links section.
    
  • Python
    def ok(n):
        s = str(n)
        subs = (s[i:j] for i in range(len(s)) for j in range(i+1, len(s)+1) if s[i]!='0')
        return n and all(n%v == 0 for ss in subs if (v:=int(ss)) > 0)
    print([k for k in range(1000) if ok(k)]) # Michael S. Branicky, May 09 2025
Showing 1-2 of 2 results.