OFFSET
1,1
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.
EXAMPLE
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.
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 *)
PROG
(Magma) moran:=func<n|n mod &+Intseq(n) eq 0 and IsPrime(n div &+Intseq(n))>;
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;
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marius A. Burtea, Sep 18 2020
STATUS
approved