cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-6 of 6 results.

A337535 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.

Original entry on oeis.org

1, 3, 4, 5, 3, 3, 3, 3, 5, 11, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 37, 19, 3, 4, 41, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 41, 83, 3, 5, 43
Offset: 1

Views

Author

Michel Marcus, Aug 31 2020

Keywords

Comments

The choice b>2 in the name of this sequence comes from the fact that base 2 has the desired property for all n>1.

Examples

			a(4) = 5 since 4 = 4_5, and 5 is the only base b > 2 with digit b-1.
a(7) = 3 since 7 = 21_3 so containing the digit 2.
		

Crossrefs

Programs

  • PARI
    isok(n, b) = vecmax(digits(n, b)) == b-1;
    a(n) = if (n==1, return (1)); my(b=3); while(!isok(n, b), b++); b;

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

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 4, 3, 5, 2, 6, 4, 7, 5, 8, 3, 9, 3, 10, 7, 11, 5, 12, 5, 13, 9, 14, 4, 15, 6, 16, 11, 17, 7, 18, 2, 19, 13, 20, 2, 21, 7, 22, 15, 23, 7, 24, 7, 25, 17, 26, 4, 27, 11, 28, 19, 29, 8, 30, 8, 31, 21, 32, 13, 33, 6, 34, 23, 35, 6
Offset: 1

Views

Author

François Marques, Oct 21 2020

Keywords

Comments

The choice b <= n in the name of this sequence comes from the fact that base n+1 has the desired property for all n > 1.
For n > 2, a(n) <= (n+1)/2.

Examples

			a(7) = 4, since 7 = 13_4 so containing the digit 3, and 7 = 12_5 = 11_6 = 10_7.
a(10) = 2, since 10 = 1010_2 so containing the digit 1, and this does not happen for bases between 3 and 10 (i.e., 10 is in the sequence A337536).
		

Crossrefs

Programs

  • Mathematica
    baseQ[n_, b_] := MemberQ[IntegerDigits[n, b], b - 1]; a[1] = 1; a[n_] := Select[Range[n, 2, -1], baseQ[n, #] &, 1][[1]]; Array[a, 100] (* Amiram Eldar, Oct 21 2020 *)
  • PARI
    a(n) = if (n==1, return (1)); my(b=ceil((n+1)/2)); while(vecmax(digits(n, b))
    				

Formula

a(n) = (n + 1)/lpf(n + 1) if n + 1 is composite, where lpf(n) is the least prime dividing n, A020639. - Devansh Singh, Dec 06 2020

A333970 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.

Original entry on oeis.org

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

Views

Author

Devansh Singh, Sep 03 2020

Keywords

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'}.

Examples

			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
		

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.

Programs

  • 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

Extensions

More terms from Michel Marcus, Sep 11 2020

A337143 Numbers k for which there are only 3 bases b (2, k+1 and another one) in which the digits of k contain the digit b-1.

Original entry on oeis.org

5, 6, 8, 9, 12, 16, 18, 28, 37, 81, 85, 88, 130, 150, 262, 810, 1030, 1032, 4132, 9828, 9832, 10662, 10666, 562576, 562578
Offset: 1

Views

Author

François Marques, Sep 14 2020

Keywords

Comments

This sequence is the list of indices k such that A337496(k)=3.
Conjecture: this sequence is finite and full. a(26) > 3.8*10^12 if it exists.
All terms of this sequence increased by 1 are either prime numbers, or prime numbers squared, or 2 times a prime number because if b is a strict divisor of k+1, the digit for the units in the expansion of k in base b is b-1 so it must be 2 or the third base. In fact k+1 could have been equal to 8=2*4 but 7 is not a term of the sequence (7 = 111_2 = 21_3 = 13_4 = 7_8).

Examples

			a(7)=18 because there are only 3 bases (2, 19 and 3) which satisfy the condition of the definition (18=200_3) and 18 is the seventh of these numbers.
		

Crossrefs

Cf. Numbers with at least one digit b-1 in base b : A074940 (b=3), A337250 (b=4), A337572 (b=5), A011539 (b=10), A095778 (b=11).
Cf. Numbers with no digit b-1 in base b: A005836 (b=3), A023717 (b=4), A020654 (b=5), A037465 (b=6), A020657 (b=7), A037474 (b=8), A037477 (b=9), A007095 (b=10), A065039 (b=11).

A337497 a(n) is the smallest integer k with exactly n bases b such that k in base b contains the digit b-1; or -1 if there is no such integer.

Original entry on oeis.org

0, 1, 2, 5, 7, 11, 19, 39, 23, 69, 103, 47, 59, 125, 95, 143, 119, 179, 299, 251, 335, 527, 239, 419, 599, 359, 479, 1019, 671, 1619, 1727, 959, 719, 1319, 839, 2039, 1259, 2771, 2339, 2099, 1439, 5471, 1679, 2159, 3695, 3599, 2879, 5939, 3779, 2519, 4619, 3359, 4319
Offset: 0

Views

Author

François Marques, Aug 29 2020

Keywords

Comments

a(n) = Min_({k | A337496(k)=n}) if the set is not empty, else -1.
Conjecture: a(n) > log(n)^(sqrt(2)*log(n)) for n>1. This have been checked for n<3444, and for n<10275 unless if a(n)=-1.

Examples

			a(7) is 39 because 39 has 7 bases b (which are 2,4,5,8,10,20 and 40) where the digits of n contain the digit b-1 and this does not happen for a smaller integer.
		

Crossrefs

Programs

A338420 Numbers k having exactly one base b which is not a divisor of k+1, and k contains the digit b-1 in base b.

Original entry on oeis.org

2, 4, 7, 8, 10, 13, 15, 19, 23, 25, 26, 29, 31, 36, 38, 40, 51, 53, 55, 59, 63, 71, 80, 82, 84, 86, 87, 99, 101, 107, 109, 119, 127, 128, 129, 137, 143, 151, 152, 155, 161, 167, 169, 209, 215, 227, 256, 259, 260, 261, 265, 266, 267, 269, 271
Offset: 1

Views

Author

Devansh Singh, Oct 25 2020

Keywords

Comments

All the terms of A337536 are in this sequence except A337536(2)=3.
There are only 30 terms which are even up to n=124705.

Crossrefs

Cf. A337536.

Programs

Showing 1-6 of 6 results.