[go: up one dir, main page]

login
Revision History for A337535 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
For n>1, a(n) is the least base b>2 such that the digits of n in base b contain the digit b-1; a(1)=1.
(history; published version)
#32 by Joerg Arndt at Fri Jan 01 10:31:35 EST 2021
STATUS

reviewed

approved

#31 by Peter Luschny at Fri Jan 01 05:50:47 EST 2021
STATUS

proposed

reviewed

#30 by Joerg Arndt at Fri Jan 01 02:47:24 EST 2021
STATUS

editing

proposed

#29 by Joerg Arndt at Fri Jan 01 02:47:12 EST 2021
COMMENTS

Comment from Devansh Singh, Dec 07 2020: (Start)

0. Take some maximum n = N for finding out a(n).

1. Iterate b in ascending order. 3<=b<=(N+1)/2.

2. Start with n = b-1 and iterate n as follows.

3. n in base b, contains r (b-1) digits and s (b-2) digits in continuation from the right i.e. n_b = ..(b-k)(b-2)(b-2)..(b-2)(b-1)..(b-1), so a(n+i) = b for i = 0 to (b^(r+s) - b^r)/(b-1) inclusive.

4. Take next n equal to n+i+b with n <= N.

5. Repeat step 3 and 4 till n<=N.

6. Repeat all steps(1 to 6) and skip setting a(n) in step 3 for those values of n for which a(n) is already set.

This procedure gives a(n) for those values of n which are not in A337536. For those values of n, a(n) = n+1.

For example: Start with b=3 so n>=2. a(2) = 3 where (r,s) for n=2 is (1,0) so (b^(r+s) - b^r)/(b-1) = 0, then next n = 2+0+3 = 5. a(5) = 3 where (r,s) for n=5 is (1,1) so (b^(r+s) - b^r)/(b-1) = 3 and a(5)=a(6)=a(7)=a(8)=3. Now next n = 5+3+3 = 8+3 =11. If 11 is maximum n for searching a(n) then take next b = 4. Repeat the same procedure with b = 4 skipping those values of n for which a(n) is already set.(End)

STATUS

proposed

editing

#28 by Devansh Singh at Wed Dec 23 00:02:52 EST 2020
STATUS

editing

proposed

Discussion
Wed Dec 23
03:56
Kevin Ryde: I'm still concerned about efficiency.  Simple search takes about a(n), versus going through all bases is about num bases A337496(n) visits (of which use only the first visit).  Looks like former wins here in practice, but that you have a decent strategy for A337496 over range 1..N.  (Superior to the naive search all b each n.)
Thu Dec 31
02:47
Joerg Arndt: We have a short, readable, and efficient program; no need for this!
#27 by Devansh Singh at Wed Dec 23 00:01:08 EST 2020
COMMENTS

Comment from Devansh Singh, Dec 07 2020: (Start)

0. Take some maximum n = N for finding out a(n).

1. Iterate b in ascending order. 3<=b<=(N+1)/2.

2. Start with n = b-1 and iterate n as follows.

For b = 3, 4, 5, ... taken in ascending order and n taken in ascending order from {n>=b-1: b|(n+1)} in base b, contains r (b-1) digits and s (b-2) digits in continuation from the right (i.e. n_b = ..(b-k)(b-2)(b-2)..(b-2)(b-1)..(b-1)), then , so a(n+i) = b for i = 0 to (b^(r+s) - b^r)/(b-1) inclusive. For base b+m, m>0 skip those values of n for which a(n) is already set. - _Devansh Singh_, Dec 07 2020

4. Take next n equal to n+i+b with n <= N.

5. Repeat step 3 and 4 till n<=N.

6. Repeat all steps(1 to 6) and skip setting a(n) in step 3 for those values of n for which a(n) is already set.

This procedure gives a(n) for those values of n which are not in A337536. For those values of n, a(n) = n+1.

For example: Start with b=3 so n>=2. a(2) = 3 where (r,s) for n=2 is (1,0) so (b^(r+s) - b^r)/(b-1) = 0, then next n = 2+0+3 = 5. a(5) = 3 where (r,s) for n=5 is (1,1) so (b^(r+s) - b^r)/(b-1) = 3 and a(5)=a(6)=a(7)=a(8)=3. Now next n = 5+3+3 = 8+3 =11. If 11 is maximum n for searching a(n) then take next b = 4. Repeat the same procedure with b = 4 skipping those values of n for which a(n) is already set.(End)

STATUS

proposed

editing

#26 by Wesley Ivan Hurt at Tue Dec 22 12:29:33 EST 2020
STATUS

editing

proposed

Discussion
Tue Dec 22
13:01
Devansh Singh: I don't have proof but if we write (r,s) for b=3 from my comment then some (r, s) values repeat. (r, s) =(1, 0), (1, 1), (1, 0), (1, 2), (1, 0), (1, 1), (1, 0), (1, 3),...
18:08
Kevin Ryde: Yes in general repeat r,s is low digits below an arbitrary high part of n (or maybe arbitrary if every n or without high b-1 if iteration steps past maximum i).  r the "valuation" I mentioned before.

Your wording in the comment is still not particularly good.  Multiple conditions deserve a hint of what is accomplished (iterate those n with somewhere b-1), otherwise it leaves the reader with more work than information.  "base b+m, m>0" seems clumsy.  Is this an efficient procedure?
#25 by Wesley Ivan Hurt at Tue Dec 22 12:29:01 EST 2020
NAME

For n>1 , a(n) is the least base b>2 such that the digits of n in base b contain the digit b-1; a(1)=1.

COMMENTS

For b in {b= 3, 4, 5, ...} taken in ascending order: and n taken in ascending order from {n>=b-1: b|(n+1)} in base b , contains r (b-1) digits and s (b-2) digits in continuation from the right (n_b = ..(b-k)(b-2)(b-2)..(b-2)(b-1)..(b-1)) , then a(n+i) = b for i = 0 to (b^(r+s) - b^r)/(b-1) inclusive. For base b+m, m>0 skip those values of n for which a(n) is already set. - Devansh Singh, Dec 07 2020

STATUS

proposed

editing

#24 by Devansh Singh at Tue Dec 22 12:00:20 EST 2020
STATUS

editing

proposed

#23 by Devansh Singh at Tue Dec 22 11:59:55 EST 2020
COMMENTS

For fixed b in {b=3,4,5..} taken in ascending order: n taken in ascending order from {n>=b-1: b|(n+1)} in base b contains r (b-1) digits and s (b-2) digits in continuation from the right(n_b = ..(b-k)(b-2)(b-2)..(b-2)(b-1)..(b-1)) then a(n+i) = b for i = 0 to (b^(r+s) - b^r)/(b-1) inclusive. For base b+m, m>0 skip those values of n for which a(n) is already set. - Devansh Singh, Dec 07 2020