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.

A341434 a(n) is the number of bases 1 < b < n in which n is divisible by its product of digits.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 2, 3, 2, 2, 1, 5, 2, 3, 4, 6, 1, 5, 1, 5, 4, 4, 1, 9, 2, 2, 4, 5, 1, 7, 3, 9, 4, 2, 3, 12, 1, 2, 3, 10, 1, 7, 2, 7, 7, 2, 1, 15, 2, 5, 3, 6, 1, 10, 3, 10, 4, 3, 1, 14, 1, 2, 7, 14, 3, 8, 1, 6, 3, 6, 1, 20, 2, 3, 8, 7, 3, 7, 1, 16, 7, 2, 1, 14
Offset: 1

Views

Author

Amiram Eldar, Feb 11 2021

Keywords

Examples

			a(3) = 1 since 3 is divisible by its product of digits only in base 2: 3 = 11_2 and 1*1 | 3.
a(6) = 2 since 6 is divisible by its product of digits in 2 bases: in base 4, 6 = 12_4 and 1*2 | 6, and in base 5, 6 = 11_5 and 1*1 | 6.
		

Crossrefs

Programs

  • Mathematica
    q[n_, b_] := (p = Times @@ IntegerDigits[n, b]) > 0 && Divisible[n, p]; a[n_] := Count[Range[2, n], _?(q[n, #] &)]; Array[a, 100]
  • PARI
    a(n) = sum(b=2, n-1, my(x=vecprod(digits(n, b))); x && !(n%x)); \\ Michel Marcus, Feb 12 2021

Formula

a(n) > 0 for all numbers n > 2 since n in base b = n-1 is 11.
a(n) > 1 for all even numbers > 4 since n in base b = n-2 is 12. Similarly, a(n) > 1 for all composite numbers > 4 since if n = k*m, then n is divisible by its product of digits in bases n-m and n-k.
a(p) > 1 for primes p in A085104.
a(p) > 2 for primes p in A119598 (i.e., 31, 8191, ...).
a(n) >= A088323(n), with equality if n = 4 or if n is a prime.