A214019 a(n) is the smallest positive number such that n divides the sum of all numbers formed by cyclically permuting digits of a(n).
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 111, 222, 333, 370, 407, 444, 481, 518, 555, 592, 629, 666, 777, 888, 999, 1111, 1818, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 11111, 22222, 33333, 44444, 55555, 66666, 77777, 88888, 99999
Offset: 1
Examples
For example with 481: 481 + 814 + 148 = 1443 and 481 divides 1443.
Crossrefs
Cf. A160818.
Programs
-
Mathematica
lst = {}; cycDigitPerms[n_Integer, b_: 10] := Module[{list = {n}, digits = IntegerDigits[n, b], len, counter, holder, next}, len = Length[digits]; counter = 1; While[counter < len, holder = digits[[-1]]; digits = Drop[digits, -1]; digits = Insert[digits, holder, 1]; list = Append[list, FromDigits[digits, b]]; counter++]; Return[list]]; Do[If[Divisible[Total@cycDigitPerms[n], n], AppendTo[lst, n]], {n, 10^5}]; lst (* Most of the code is from Alonso del Arte *)
Comments