|
|
A358067
|
|
a(n) is the smallest m such that A144261(m) = n.
|
|
1
|
|
|
1, 15, 14, 33, 22, 17, 73, 49, 13, 11, 529, 31, 397, 293, 241, 199, 1633, 53, 3727, 761, 331, 491, 4343, 431, 1943, 887, 383, 3659, 3809, 377, 15863, 9419, 2713, 2993, 26753, 1583, 30311, 5297, 8971, 2753, 5363, 983, 11603, 4919, 18314, 14657, 59303, 1499, 99179
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
In other words, a(n) is the smallest element m of the set of the integers k that satisfy {A144261(k) = n and n * k is a Niven number} (see Example section).
Same question as in A144261: does a(n) exist for all n?
|
|
LINKS
|
|
|
EXAMPLE
|
A144261(15) = A144261(25) = A144261(35) = A144261(51) = ... = 2 because 15, 25, 35, 51, ... are not Niven numbers and 2 is the smallest integer such that 2*15=30, 2*25=50, 2*35=70, 2*51=102, ..., are Niven (or Harshad) numbers. Since 15 is the least integer that, when multiplied by 2, yields a Niven number (2*15), a(2) = 15.
|
|
MATHEMATICA
|
f[n_] := Module[{k = 1, p}, While[! Divisible[p = k*n, Plus @@ IntegerDigits[p]], k++]; k]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[50, 10^6] (* Amiram Eldar, Oct 29 2022 *)
|
|
PROG
|
(PARI) f(n) = my(k=1); while ((k*n) % sumdigits(k*n), k++); k; \\ A144261
a(n) = my(k=1); while (f(k) != n, k++); k; \\ Michel Marcus, Oct 31 2022
(Python)
from itertools import count
def A358067(n): return next(filter(lambda m:n==next(filter(lambda k:not (r:=k*m) % sum(int(d) for d in str(r)), count(1))), count(1))) # Chai Wah Wu, Nov 04 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|