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-4 of 4 results.

A337536 Numbers k for which there are only 2 bases b (2 and k+1) where the digits of k contain the digit b-1.

Original entry on oeis.org

2, 3, 4, 10, 36, 40, 82, 256
Offset: 1

Views

Author

Michel Marcus, Aug 31 2020

Keywords

Comments

These could be called "nine-free numbers".
From David A. Corneth, Aug 31 2020: (Start)
This sequence has density 0. Conjecture: this sequence is finite and full. a(9) > 10^100 if it exists.
Suppose we want to see if 22792 = 1011021011_3 is a term. Since it has a digit of 2 in base 3, we can see that it is not. The next number that does not have the digit 2 in base 3 is 1011100000_3 = 22842, so we can proceed from there. In a similar way we can skip numbers based on bases b > 3. (End)
All terms of this sequence increased by 1 (except a(2)=3) are prime. - François Marques, Aug 31 2020
From Devansh Singh, Sep 19 2020: (Start)
If n is one less than an odd prime and we are interested in bases 3 <= b <= n-1 such that n in base b contains the digit b-1, then divisor of b (except 1) -1 cannot be the last digit since divisor of b divides n+1, which is not possible as n+1 is an odd prime.
If the last digit is 1, then b is odd as 1 = 2-1 and 2 cannot divide b as n+1 is an odd prime.
If the last digit is 0, then b-1 is the last digit of n-1 in base b.
b <= n/2 for even n,b <= (n+1)/2 for odd n.
This sequence is equivalent to the existence of only one prime generating polynomial = F(x) (having positive integer coefficients >=0 and <=b-1 for F(b)) such that F(2) = p.
There is no other prime generating polynomial = G(x) (having positive integer coefficients >=0 and <= b-1 for G(b)) that generates p for 2 < x = b <= (p-1)/2.
(End)

Examples

			2 is a term because 2 = 10_2 = 2_3, so both have the digit b-1, and there are no other bases where this happens.
4 is a term because 4 = 100_2 = 4_5, so both have the digit b-1, and there are no other bases where this happens.
		

Crossrefs

Programs

  • PARI
    isok(n, b) = vecmax(digits(n, b)) == b-1;
    b(n) = if (n==1, return (1)); my(b=3); while(!isok(n, b), b++); b; \\ A337535
    is(n) = b(n) == n+1;
    
  • PARI
    \\ See Corneth link \\ David A. Corneth, Aug 31 2020

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).
Showing 1-4 of 4 results.