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.

A332268 a(n) is the number of divisors of n that are Niven numbers.

Original entry on oeis.org

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

Views

Author

Marius A. Burtea, May 04 2020

Keywords

Comments

If p is a prime number, p >= 11, then a(p) = 1.
Numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 36, 40, 54, 63, 72, 81, 108, 162, 216, 243, 324, 486, 648, 972, 1944, have all divisors Niven numbers. There are only finitely many numbers all of whose divisors are Niven numbers. (A337741).
A333456(n) is the least number k such that a(k) = n. - Bernard Schott, Jul 30 2022

Examples

			For n = 4 the divisors are 1, 2, 4 and they are all Niven numbers, so a(4) = 3.
For n = 14 the divisors are 1, 2, 7 and 14. Only 1, 2 and 7 are Niven numbers, so a(14) = 3.
		

Crossrefs

Programs

  • Magma
    [#[d:d in Divisors(k)|d mod &+Intseq(d) eq 0]:k  in [1..100]];
    
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Divisible[#, Plus @@ IntegerDigits[#]] &]; Array[a, 100] (* Amiram Eldar, May 04 2020 *)
  • PARI
    a(n) = sumdiv(n, d, !(d % sumdigits(d))); \\ Michel Marcus, May 04 2020

Formula

a(A333456(n)) = n. - Bernard Schott, Jul 30 2022