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.

A055240 Number of bases in which n is not divisible by any of its digits.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 3, 0, 3, 0, 1, 1, 6, 0, 3, 1, 2, 0, 7, 0, 7, 1, 4, 4, 7, 0, 9, 4, 6, 1, 11, 0, 13, 2, 3, 6, 17, 0, 11, 3, 8, 3, 18, 2, 13, 3, 11, 9, 22, 0, 18, 9, 8, 4, 15, 1, 23, 8, 16, 5, 24, 1, 24, 12, 11, 8, 24, 4, 29, 4, 15, 14, 31, 1, 22, 14, 21, 8, 34, 1, 23
Offset: 1

Views

Author

Henry Bottomley, May 04 2000

Keywords

Examples

			a(27)=2 because it is written as 27 in base 10 and 25 in base 11 and 27 is not divisible by 2, 5 or 7.
		

Crossrefs

Programs

  • Maple
    f:= proc(n)
       nops(select(b -> not ormap(d -> d <> 0 and n mod d = 0, convert(n,base,b)), [$3 .. (n-1)/2]))
    end proc:
    map(f, [$1..100]); # Robert Israel, Jan 09 2024

A055239 Numbers which are not divisible by any of their digits in at least one base.

Original entry on oeis.org

11, 13, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92
Offset: 1

Views

Author

Henry Bottomley, May 04 2000

Keywords

Comments

It seems likely all integers greater than 120 appear in this sequence

Examples

			9 is excluded because it can be written as 111111111, 1001, 100, 21, 14, 13, 12, 11, 10 or 9 and in every case there is a digit which divides 9; 11 is in the sequence because in base 4 it is written 23 and 11 is not divisible by either 2 or 3
		

Crossrefs

A055242 Largest base in which n is not divisible by any of its digits (0 if no such base).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0, 0, 7, 0, 8, 0, 8, 6, 10, 0, 11, 7, 11, 0, 13, 0, 14, 9, 14, 10, 16, 0, 17, 11, 17, 11, 19, 0, 20, 13, 19, 14, 22, 0, 23, 14, 23, 15, 25, 11, 26, 17, 26, 18, 28, 0, 29, 19, 29, 19, 31, 14, 32, 21, 32, 22, 34, 13, 35, 23, 34, 23, 37, 17, 38
Offset: 1

Views

Author

Henry Bottomley, May 04 2000

Keywords

Comments

If n is odd then a(n)<=(n-3)/2 since in base (n-1)/2 it is written 21, in bases (n+1)/2 through to n its first digit is 1 and in bases >n it is just itself as a single digit; and n is divisible by 1 and itself. If n is even then a(n)<=n/3 since in bases >n/3 through to n/2 its first digit is 2, in bases n/2+1 through to n its first digit is 1 and in bases >n it is just itself as a single digit; and n is divisible by 1, 2 and itself

Examples

			a(11)=4 because it is written as 23 in base 4 and 11 is not divisible by 2 or 3; in every base from 5 through to 11 it has a digit 1 and in every base from 12 onwards it is simply digit 'eleven' - 11 is divisible by both 1 and 'eleven'
		

Crossrefs

A055241 Smallest base in which n is not divisible by any of its digits (0 if no such base).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0, 0, 5, 0, 5, 0, 8, 6, 5, 0, 7, 7, 10, 0, 6, 0, 7, 9, 7, 6, 4, 0, 7, 7, 7, 11, 7, 0, 4, 12, 16, 7, 4, 0, 9, 11, 9, 9, 5, 10, 8, 10, 10, 9, 4, 0, 8, 8, 11, 11, 5, 14, 5, 9, 9, 11, 9, 13, 5, 10, 11, 10, 5, 10, 5, 11, 11, 11, 10, 15, 5, 10, 10, 13, 5, 19
Offset: 1

Views

Author

Henry Bottomley, May 04 2000

Keywords

Examples

			a(11)=4 because it is written as 111111111111 in base 1, 1011 in base 2, 102 in base 3 and 23 in base 4; 11 is divisible by 1 but not by 2 or 3
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local b,L;
      for b from 3 to n-2 do
        L:= convert(convert(n,base,b),set) minus {0};
        if andmap(d -> n mod d <> 0, L) then return b fi
      od;
      0
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 29 2024
  • Python
    from sympy.ntheory import digits
    def a(n): return next((b for b in range(3, n-2) if not any(n%d==0 for d in digits(n, b)[1:] if d > 0)), 0)
    print([a(n) for n in range(1, 91)]) # Michael S. Branicky, Oct 29 2024
Showing 1-4 of 4 results.