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.

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).

This page as a plain text file.
%I A214019 #19 Mar 01 2024 02:05:06
%S A214019 1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99,111,222,333,370,407,444,
%T A214019 481,518,555,592,629,666,777,888,999,1111,1818,2222,3333,4444,5555,
%U A214019 6666,7777,8888,9999,11111,22222,33333,44444,55555,66666,77777,88888,99999
%N 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).
%C A214019 Many terms in this sequence are the same as A160818(n) but not all.
%e A214019 For example with 481: 481 + 814 + 148 = 1443 and 481 divides 1443.
%t A214019 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_ *)
%Y A214019 Cf. A160818.
%K A214019 base,nonn
%O A214019 1,2
%A A214019 _Arkadiusz Wesolowski_, Jul 01 2012