The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A152925 a(n) = smallest number m such that in 1,2,..,m written in base n, no two of the n digits occurs the same number of times. 0

%I #18 Oct 29 2023 17:28:12

%S 1,5,13,47,105,536,1341,9231,24697,212594,592269,6100559,17464969,

%T 209215572,610839805,8338210079,24709115769,378460880126

%N a(n) = smallest number m such that in 1,2,..,m written in base n, no two of the n digits occurs the same number of times.

%e In base 5 in 1,2,..,142_5 = 47, digit 1 occurs 43 times, 2 occurs 20, 3 occurs 19 times, 4 occurs 17 times, and 0 occurs 14.

%o (Python)

%o def different(d):

%o for i in range(len(d)):

%o for j in range(i):

%o if d[i] == d[j]:

%o return False

%o return True

%o def a(base):

%o d = [0] * base

%o n = 0

%o while True:

%o n += 1

%o m = n

%o while m > 0:

%o d[m % base] += 1

%o m //= base

%o if different(d):

%o break

%o return n

%K nonn,base,more

%O 2,2

%A _Jan Fricke_, Dec 15 2008

%E Edited by _Franklin T. Adams-Watters_, Sep 11 2011

%E a(16)-a(19) from _Michael S. Branicky_, Mar 26 2022

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 May 15 01:31 EDT 2024. Contains 372536 sequences. (Running on oeis4.)