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.
%I A276502 #25 Aug 30 2018 15:51:51 %S A276502 1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, %T A276502 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, %U A276502 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,6 %N A276502 Least k > 0 such that A045876(n) divides A045876(n*10^k). %C A276502 Corresponding values of A045876(n*10^a(n))/A045876(n) are 11, 11, 11, 11, 11, 11, 11, 11, 11, 101, 303, 303, 303, 303, 303, 303, 303, 303, 303, 101, 303, 303, 303, 303, 303, 303, 303, 303, 303, 101, ... %C A276502 From _Charlie Neder_, Jul 16 2018: (Start) %C A276502 From the formula for A045876(n) we make the following modifications: %C A276502 - A (the mean of the digits) becomes S/D (sum of digits / # of digits) %C A276502 - N (# of arrangements of digits) becomes R*Z (# of arrangements of nonzero digits * # of ways to insert the proper number of zeros) %C A276502 Appending zeros to n does not change S or R, so if (S*R*Z*I/D)(n) divides (S*R*Z*I/D)(n*10^k), then (Z*I/D)(n) divides (Z*I/D)(n*10^k). However, Z, I, and D are completely determined by the number of digits of n and the number of those digits which are zero, so a(n) = a(A136400(n)). (End) %e A276502 a(10) = 2 because A045876(10) = 1+10 = 11 does not divide A045876(100) = 1+10+100 = 111 and 11 divides A045876(1000) = 1+10+100+1000 = 1111. %t A276502 A045876[n_] := Total[FromDigits /@ Permutations[IntegerDigits[n]]]; a[n_] := For[k = 1, True, k++, If[Divisible[A045876[n*10^k], A045876[n]], Return[k] ] ]; Array[a, 101] (* _Jean-François Alcover_, Jul 26 2017 *) %o A276502 (PARI) A047726(n) = n=eval(Vec(Str(n))); (#n)!/prod(i=0, 9, sum(j=1, #n, n[j]==i)!); %o A276502 A055642(n) = #Str(n); %o A276502 A007953(n) = sumdigits(n); %o A276502 A045876(n) = ((10^A055642(n)-1)/9)*(A047726(n)*A007953(n)/A055642(n)); %o A276502 a(n) = {my(k = 1); while (A045876(n*(10^k)) % A045876(n), k++); k; } %Y A276502 Cf. A045876. %K A276502 nonn,base %O A276502 1,10 %A A276502 _Altug Alkan_, Sep 10 2016