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.

A333456 a(n) is the smallest number with exactly n divisors that are Niven numbers.

Original entry on oeis.org

1, 2, 4, 6, 45, 12, 30, 24, 36, 84, 60, 72, 400, 144, 120, 216, 180, 240, 420, 504, 600, 960, 360, 900, 840, 1200, 1512, 720, 1620, 4500, 1080, 2700, 1800, 3024, 3360, 2880, 3960, 2160, 3240, 5760, 2520, 6720, 4320, 5400, 9360, 7920, 7200, 6480, 13860, 8640
Offset: 1

Views

Author

Marius A. Burtea, May 03 2020

Keywords

Comments

A Niven number (A005349) is a number that is divisible by the sum of its digits; e.g., 12 is a Niven number because it's divisible by 1 + 2.
The divisor 1 is trivially a Niven number. For a number n, the divisor n itself is considered
Conjecture: For every n there is at least one number k with n divisors Niven numbers.
Not all terms in the sequence are Niven numbers. For example: a(85) = 85680 has digsum(85680) = 27 and 85680/27 = 3173.33 ...
Also, a(152) = 856800, a(159) = 887040, a(161) = 2096640.
The number of non-Niven terms can be infinite.

Examples

			Of the divisors of 45, only five are Niven numbers: 1, 3, 5, 9, and 45.
Number 12 has all six divisors 1, 2, 3, 4, 6 and 12 that are Niven numbers.
		

Crossrefs

Programs

  • Magma
    a:=[]; for n in [1..50] do m:=1; while #[d:d in Divisors(m)|d mod &+Intseq(d) eq 0] ne n do m:=m+1; end while; Append(~a,m); end for; a;
    
  • Mathematica
    numDiv[n_] := DivisorSum[n, 1 &, Divisible[#, Plus @@ IntegerDigits[#]] &]; a[n_] := Module[{k = 1}, While[numDiv[k] != n, k++]; k]; Array[a, 50] (* Amiram Eldar, May 04 2020 *)
  • PARI
    f(n) = sumdiv(n, d, !(d % sumdigits(d))); \\ A332268
    a(n) = my(k=1); while (f(k) != n, k++); k; \\ Michel Marcus, May 04 2020