login
A119354
Smallest number which does not use digit n-1 written in base n, but does use digit b-1 written in base b for any 1<b<n.
3
0, 1, 2, 7, 14, 23, 139, 47, 485, 319, 989, 239, 5927, 23319, 27719, 13679, 57119, 159119, 746927, 500399, 1627919, 2585519, 3694397, 7305479, 17067599, 82265039, 384812999, 41126399, 61483967, 586370399, 589188599, 2196179999, 1770310079, 51515219183, 12415603199, 1278033119, 24126046559
OFFSET
2,3
COMMENTS
From Michael S. Branicky, Sep 08 2025: (Start)
a(36) = 12415603199, a(37) = 1278033119.
a(35) and a(38..oo) > 2*10^9. (End)
From David A. Corneth, Sep 10 2025: (Start)
We can ease the search a little bit.
In a search for a(n) if we test some number t and the number t does not have a digit b-1 for some 1 < b < n then we can reset t to the smallest number > t that has a digit b-1. That is set t to t + b-1 - t%b.
For example in a search for a(8) we might be testing 48 and see that 48 = 120_6 which does not contain a digit 6-1. The next number larger than 48 that does contain a digit 5 in base 6 is 48 + 5 - (48%6).
Also if we test a number t in a search for a(n) and see that it has a digit n-1 in base n then we can reset it to the smallest number > t that has no digit n-1 in base n.
For example in our search for a(8) we might be checking 57 = 71_8 which has a digit n-1 in base n. We can reset it to "80_8" = 100_8 = 64 by increasing the 7 by 1 and setting all less significant digits to 0.
In the search for a(35) and a(38) it was sufficient to check just about 1 in 19 numbers this way. (End)
FORMULA
A119352(a(n)) = n and A119352(m) != n for m < a(n). - Reinhard Zumkeller, Apr 12 2015
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a119354 = fromJust . (`elemIndex` a119352_list)
-- Reinhard Zumkeller, Apr 12 2015
CROSSREFS
Sequence in context: A324587 A018392 A051640 * A383265 A249547 A088207
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
More terms from R. J. Mathar, Sep 07 2007
a(21)-a(27) by Reinhard Zumkeller, Apr 12 2015
a(28)-a(34) from Amiram Eldar, Jul 29 2025
a(36)-a(37) from Michael S. Branicky, Sep 08 2025
a(35) and a(38) from David A. Corneth, Sep 09 2025
STATUS
approved