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.

A358067 a(n) is the smallest m such that A144261(m) = n.

This page as a plain text file.
%I A358067 #26 Nov 04 2022 10:48:15
%S A358067 1,15,14,33,22,17,73,49,13,11,529,31,397,293,241,199,1633,53,3727,761,
%T A358067 331,491,4343,431,1943,887,383,3659,3809,377,15863,9419,2713,2993,
%U A358067 26753,1583,30311,5297,8971,2753,5363,983,11603,4919,18314,14657,59303,1499,99179
%N A358067 a(n) is the smallest m such that A144261(m) = n.
%C A358067 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).
%C A358067 Same question as in A144261: does a(n) exist for all n?
%H A358067 Giovanni Resta, <a href="https://www.numbersaplenty.com/set/Harshad_number/">Harshad numbers</a>.
%e A358067 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.
%t A358067 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 *)
%o A358067 (PARI) f(n) = my(k=1); while ((k*n) % sumdigits(k*n), k++); k; \\ A144261
%o A358067 a(n) = my(k=1); while (f(k) != n, k++); k; \\ _Michel Marcus_, Oct 31 2022
%o A358067 (Python)
%o A358067 from itertools import count
%o A358067 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
%Y A358067 Cf. A005349 (Niven numbers), A144261.
%K A358067 nonn,base
%O A358067 1,2
%A A358067 _Bernard Schott_, Oct 29 2022
%E A358067 More terms from _Amiram Eldar_, Oct 29 2022