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 A226171 #27 Dec 23 2021 00:53:55 %S A226171 0,0,2,0,2,0,2,6,2,4,2,8,2,2,2,6,2,8,2,7,5,2,2,14,2,2,2,2,2,2,2,6,2,3, %T A226171 2,8,2,2,2,12,2,3,2,2,2,2,2,14,2,2,2,2,2,2,3,2,2,2,2,8,2,2,2,6,2,3,2, %U A226171 3,3,2,2,14,2,2,2,2,2,2,2,8,5,2,2,5,2,2 %N A226171 Smallest base in which n is not Niven (or zero if n is Niven in every base). %C A226171 Niven numbers (in base b) are divisible by the sum of their digits (in base b). %C A226171 Questions: are 1, 2, 4 and 6 the only zeros in this sequence? Where are the records or high water marks? %C A226171 From _Bert Dobbelaere_, Oct 08 2018: (Start) %C A226171 1,2,4,6 are the only numbers that are Niven in every base. %C A226171 Proof: Suppose n is Niven in every base, then consider the base-b representations of n for (n/2) < b <= n. These are all 2-digit numbers with 1 as 1st digit and (n-b) as last digit. Then 1+n-b is a divisor of n for all b, meaning that all numbers between 1 up to n/2 are divisors of n. Clearly there are no such numbers larger than 6. %C A226171 a(n) < 60 for n < 10^13. %C A226171 (End) %H A226171 T. D. Noe, <a href="/A226171/b226171.txt">Table of n, a(n) for n = 1..10000</a> %e A226171 The sum of digits of 24 in bases 1 through 14 are: 24, 2, 4, 3, 8, 4, 6, 3, 8, 6, 4, 2, 12, 11. 24 is divisible by all these numbers except the last one; therefore a(24) = 14. %t A226171 Table[b = 2; While[s = Total[IntegerDigits[n, b]]; s < n && Mod[n, s] == 0, b++]; If[s == n, b = 0]; b, {n, 100}] (* _T. D. Noe_, May 30 2013 *) %o A226171 (PARI) a(n) = {for (b=2, n-1, if (frac(n/sumdigits(n,b)), return(b));); 0;} \\ _Michel Marcus_, Oct 23 2018 %Y A226171 Cf. A049445, A118363, A005349, A144261, A144262, A226169. %Y A226171 Cf. A225427 (least Niven number for all bases from 1 to n). %K A226171 nonn,base %O A226171 1,3 %A A226171 _Sergio Pimentel_, May 29 2013