[go: up one dir, main page]

login
Search: a338295 -id:a338295
     Sort: relevance | references | number | modified | created      Format: long | short | data
Irregular triangle read by rows where the n-th row lists the bases 2<=b<=n+1 where n in base b contains the digit b-1.
+10
1
2, 2, 3, 2, 4, 2, 5, 2, 3, 6, 2, 3, 7, 2, 3, 4, 8, 2, 3, 9, 2, 5, 10, 2, 11, 2, 3, 4, 6, 12, 2, 4, 13, 2, 4, 7, 14, 2, 3, 4, 5, 15, 2, 3, 4, 8, 16, 2, 3, 17, 2, 3, 6, 9, 18, 2, 3, 19, 2, 3, 4, 5, 10, 20, 2, 3, 5, 7, 21, 2, 3, 5, 11, 22, 2, 3, 5, 23, 2, 3, 4, 5, 6, 8, 12, 24
OFFSET
1,1
COMMENTS
If a number n has base 'b' representation = (... (b-1) A(j-1) ...A(3) A(2) A(1) A(0)) contains digit b-1, where b = q*(k+1)/k, k>=1 , and Sum_{i>=0} ((A(i)(mod b-q))*((b-q)^i)) > 0 then there exists n' < n such that that n' in base b-q = b' contains digit b'-1 at the same place as n in base b and 0 <= (A(i)-A'(i))/b' <= (k+1)-((A'(i)+1)/b') (A'(i) is digit of n' in base b')for all i>=0.*
This condition is necessary and sufficient.
Proof that Condition is Necessary:
Since b-1 = b-q+q-1 and b' = q/k (as b = q*(k+1)/k). Therefore (b-1) (mod b') = (b'+q-1) (mod b') = (q-1) (mod b') = b'-1 :-(1).
n in base 'b' representation = (... (b-1) A(j-1) ...A(3) A(2) A(1) A(0)).Then n = Sum_{i>=0} (A(i)*(b^i)) = Sum_{i>=0} (A(i)*((b-q+q)^i)).
n = Sum_{i>=0} (A(i)*(b'^i)) +
Sum_{i>=1} (A(i)*(b^i - b'^i))
= Sum_{i>=0} (A'(i)*(b'^i)) + Sum_{i>=0} ((A(i)-A'(i))* (b'^i)) + Sum_{i>=1} (A(i)*(b^i - b'^i)),
where A'(i) = A(i) (mod b').
Now n-Sum_{i>=0} ((A(i)-A'(i))*(b'^i))
- Sum_{i>=1} (A(i)*(b^i - b'^i))
= Sum_{i>=0} (A'(i)*(b'^i)).
Since A'(j) = A(j) (mod b') = (b-1) (mod b') = b'-1(due to equation (1) above and A(j) = b-1.
Hence there exists n' = Sum_{i>=0} (A'(i)*(b'^i)) > 0 containing digit b'-1 in base b'.
Table of n/b with cell containing T(n, b) = (n', b') for q = b/2. n' = Sum_{i>=0} (A'(i)*(b'^i))
n/b| 4 | 6 | 8 | 10 | 12
3 |(1,2)| | | |
4 | | | | |
5 | |(2,3)| | |
6 | | | | |
7 |(3,2)| |(3,4)| |
8 | | | | |
9 | | | |(4,5)|
10 | | | | |
11 |(1,2)|(5,3)| | |(5,6)
Example: For table n/b in comments containing (n',b') in its cells.
For n = 7:
In base b = 4, n = 13 :- q = b' = 4/2 = 2, and n' = (3 mod (2))*(2)^0 + (1 mod(2))*(2)^1 = 1+2 = 3.
In base b = 8, n = 7 :- q = b' = 8/2 = 4, and n' = (7 mod (4))*(4)^0 = 3.
There are no other bases b >= 4 except 4, 8 for n = 7.
(n, b) maps to (0, 1) if b is prime. Following this and comment in A337536 we can say that all of the terms of A337536 will map to (0, 1) only, except A337536(2).
For above (n, b) -> (n', b') one possible (n, b) pair for (n', b') is { Sum_{i>=0} ((A'(i)+b') *((2*b')^i)), 2*b'}.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10027 (rows for n = 1..1014, flattened)
EXAMPLE
Triangle begins
Row Bases
n=1: 2
n=2: 2 3
n=3: 2 4
n=4: 2 5
n=5: 2 3 6
n=6: 2 3 7
n=7: 2 3 4 8
n=8: 2 3 9
n=9: 2 5 10
n=10: 2 11
PROG
(PARI) row(n) = {my(list = List()); for (b=2, n+1, if (vecmax(digits(n, b)) == b-1, listput(list, b)); ); Vec(list); } \\ Michel Marcus, Sep 11 2020
CROSSREFS
Cf. A337535 (second column), A338295 (penultimate column), A337496 (row widths), A337536 (width 2), A337143 (width 3).
Rows containing bases 3..11 respectively: A074940, A337250, A337572, A333656, A337141, A337239, A338090, A011539, A095778.
KEYWORD
nonn,base,tabf,uned
AUTHOR
Devansh Singh, Sep 03 2020
EXTENSIONS
More terms from Michel Marcus, Sep 11 2020
STATUS
approved
For n > 1, a(n) is the largest base b <= prime(n)-1 such that the digits of prime(n)-1 in base b contain the digit b-1.
+10
0
2, 2, 3, 2, 4, 3, 3, 5, 4, 6, 2, 2, 7, 7, 4, 8, 8, 6, 6, 9, 9, 2, 3, 10, 5, 6, 6, 5, 11, 8, 3, 12, 12, 5, 3, 13, 13, 13, 5, 6, 6, 14, 14, 10, 10, 15, 15, 5, 5, 11, 11, 16, 16, 2, 3, 4, 5, 17, 17, 17, 10, 18, 18, 18, 18, 13, 13, 19, 19, 19
OFFSET
2,1
FORMULA
a(n) <= (1 + sqrt(4*prime(n) - 3))/2 for all n. Prime(n), which is 111 in some base Q, has a(n) = Q+1. Example: 31 = 6*5 + 1 and it is 111 in base 5. - Devansh Singh, Nov 22 2021
MATHEMATICA
Table[Max@Select[Range[2, Prime@n-1], MemberQ[IntegerDigits[Prime@n-1, #], #-1]&], {n, 2, 71}] (* Giorgos Kalogeropoulos, Nov 22 2021 *)
PROG
(Python)
import sympy
def a_n(N):
a_n=[2]
for i in sympy.primerange(5, N+1):
a_n.append(A338295(i-1))
print(a_n)
def A338295(n):
checker=0
for b in range(n//2, 1, -1):
checker=main_base_check(n, b)
if checker!=0:
break
return checker
def main_base_check(m, b):
while m!=0:
if m%b == b-1:
return b
m = m//b
return 0
a_n(500)
(PARI) a(n) = my(q=prime(n)-1); forstep(b=q, 2, -1, if (vecmax(digits(q, b)) == b-1, return (b))); \\ Michel Marcus, Apr 19 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Devansh Singh, Apr 18 2021
STATUS
approved

Search completed in 0.009 seconds