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-1 of 1 results.

A357937 a(n) is the least multiple of n that is not a Niven (or Harshad) number.

Original entry on oeis.org

11, 14, 15, 16, 15, 66, 14, 16, 99, 130, 11, 96, 13, 14, 15, 16, 17, 2898, 19, 160, 105, 22, 23, 96, 25, 26, 189, 28, 29, 390, 31, 32, 33, 34, 35, 2988, 37, 38, 39, 160, 41, 168, 43, 44, 495, 46, 47, 96, 49, 250, 51, 52, 53, 28998, 55, 56, 57, 58, 59, 4980, 61
Offset: 1

Views

Author

Rémy Sigrist, Oct 21 2022

Keywords

Comments

Niven (or Harshad) numbers are divisible by the sum of their digits, and correspond to sequence A005349.

Examples

			For n = 3, we have:
.
      k  3*k  Niven?
      -  ---  ------
      1    3  Yes
      2    6  Yes
      3    9  Yes
      4   12  Yes
      5   15  No
so a(3) = 15.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{k=1}, While[Divisible[k*n, Total[IntegerDigits[k*n]]], k++]; k*n]; Array[a, 61]
  • PARI
    a(n, base=10) = forstep (m=n, oo, n, if (m%sumdigits(m, base), return (m)))

Formula

a(n) = n * A144262(n).
Showing 1-1 of 1 results.