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.

A337731 a(n) is the smallest k >= 1 such that k*n is a Moran number.

Original entry on oeis.org

18, 9, 6, 21, 9, 3, 3, 19, 2, 19, 18, 7, 9, 3, 3, 37, 9, 1, 6, 199, 1, 9, 9, 37, 199, 6, 1, 3, 9, 1663, 12, 937, 6, 1117, 1657, 1361, 3, 3, 3, 17497, 18, 1, 12, 10909, 1, 14563, 9, 18541, 17551, 199999, 3, 3, 18, 87037, 1108909, 157141, 2, 154981, 9, 1483333
Offset: 1

Views

Author

Marius A. Burtea, Sep 18 2020

Keywords

Comments

m is a Moran number if m /digsum(m) is a prime number (A001101).
a(n) = 1 if and only if n is a Moran number.

Examples

			For n = 6, (1*6) / digsum(1*6) = 1, (2*6) / digsum(2*6) = 12 / 3 = 4, (3*6) / digsum(3*6) = 18 / 9 = 2 = prime(1), so a(6) = 3.
For n = 7, (1*7) / digsum(1*7) = 1, (2*7) / digsum(2*7) = 14 / 5, (3*7) / digsum(3*7) = 21 / 3 = 7 = prime(4), so a(7) = 3.
		

Crossrefs

Programs

  • Magma
    moran:=func;
    a:=[]; for n in [1..60] do k:=1; while not moran(k*n) do k:=k+1; end while; Append(~a,k); end for; a;
  • Mathematica
    moranQ[n_] := PrimeQ[n / Plus @@ IntegerDigits[n]]; a[n_] := Module[{k = 1}, While[!moranQ[k*n], k++]; k]; Array[a, 60] (* Amiram Eldar, Sep 19 2020 *)