login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226171 Smallest base in which n is not Niven (or zero if n is Niven in every base). 2
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, 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, 3, 3, 2, 2, 14, 2, 2, 2, 2, 2, 2, 2, 8, 5, 2, 2, 5, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Niven numbers (in base b) are divisible by the sum of their digits (in base b).
Questions: are 1, 2, 4 and 6 the only zeros in this sequence? Where are the records or high water marks?
From Bert Dobbelaere, Oct 08 2018: (Start)
1,2,4,6 are the only numbers that are Niven in every base.
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.
a(n) < 60 for n < 10^13.
(End)
LINKS
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(PARI) a(n) = {for (b=2, n-1, if (frac(n/sumdigits(n, b)), return(b)); ); 0; } \\ Michel Marcus, Oct 23 2018
CROSSREFS
Cf. A225427 (least Niven number for all bases from 1 to n).
Sequence in context: A281981 A159006 A291968 * A284280 A278520 A239246
KEYWORD
nonn,base
AUTHOR
Sergio Pimentel, May 29 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)