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.

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

A055238 Numbers that are divisible by at least one of their digits in every base.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 24, 28, 30, 36, 42, 48, 60, 120
Offset: 1

Views

Author

Henry Bottomley, May 04 2000

Keywords

Comments

This list is probably finite and complete. For example 180 fails at base 23 and 240 fails at bases 21, 31 and 33

Examples

			9 is included 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 not on the list because in base 4 it is written 23 and 11 is not divisible by either 2 or 3.
		

Crossrefs

Programs

  • Mathematica
    divQ[n_, base_] := AnyTrue[Select[IntegerDigits[n, base], Positive], Divisible[n, #]&];
    okQ[n_] := AllTrue[Range[2, n-1], divQ[n, #]&];
    Select[Range[1000], okQ] (* Jean-François Alcover, Nov 07 2019 *)
Showing 1-2 of 2 results.