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.

Previous Showing 11-14 of 14 results.

A337239 Numbers having at least one 7 in their representation in base 8.

Original entry on oeis.org

7, 15, 23, 31, 39, 47, 55, 56, 57, 58, 59, 60, 61, 62, 63, 71, 79, 87, 95, 103, 111, 119, 120, 121, 122, 123, 124, 125, 126, 127, 135, 143, 151, 159, 167, 175, 183, 184, 185, 186, 187, 188, 189, 190, 191, 199, 207, 215, 223, 231, 239, 247, 248, 249, 250, 251, 252, 253, 254, 255
Offset: 1

Views

Author

François Marques, Sep 20 2020

Keywords

Comments

Complementary sequence to A037474.

Examples

			54 is not in the sequence since it is 66_8 in base 8, but 55 is in the sequence since it is 67_8 in base 8.
		

Crossrefs

Cf. Numbers with at least one digit b-1 in base b : A074940 (b=3), A337250 (b=4), A337572 (b=5), A333656 (b=6), A337141 (b=7), this sequence (b=8), A338090 (b=9), 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), A171397 (b=11).

Programs

  • Maple
    seq(`if`(numboccur(7, convert(n, base, 8))>0, n, NULL), n=0..100);
  • Mathematica
    Select[ Range[ 0, 100 ], (Count[ IntegerDigits[ #, 8 ], 7 ]>0)& ]
  • PARI
    isok(m) = #select(x->(x==7), digits(m, 8)) >= 1;
    
  • Python
    def A337239(n):
        def f(x):
            s = oct(x)[2:]
            l = s.find('7')
            if l >= 0:
                s = s[:l]+'6'*(len(s)-l)
            return n+int(s,7)
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Dec 04 2024

A043485 Numbers having one 8 in base 9.

Original entry on oeis.org

8, 17, 26, 35, 44, 53, 62, 71, 72, 73, 74, 75, 76, 77, 78, 79, 89, 98, 107, 116, 125, 134, 143, 152, 153, 154, 155, 156, 157, 158, 159, 160, 170, 179, 188, 197, 206, 215, 224, 233, 234, 235, 236, 237, 238, 239, 240, 241, 251, 260, 269, 278, 287, 296, 305, 314
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007095 (numbers in base 9), A338090.

Programs

  • Mathematica
    Select[Range[300],DigitCount[#,9,8]==1&] (* Harvey P. Dale, Jun 26 2011 *)
  • PARI
    isok(m) = #select(x->(x==8), digits(m, 9)) == 1; \\ Michel Marcus, Oct 13 2020

Extensions

Name edited by Michel Marcus, Oct 13 2020

A190598 Maximal digit in base-9 expansion of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 2, 3, 4, 5, 6, 7, 8, 2, 2, 2, 3, 4, 5, 6, 7, 8, 3, 3, 3, 3, 4, 5, 6, 7, 8, 4, 4, 4, 4, 4, 5, 6, 7, 8, 5, 5, 5, 5, 5, 5, 6, 7, 8, 6, 6, 6, 6, 6, 6, 6, 7, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 2, 3, 4, 5, 6, 7, 8, 2, 2, 2, 3, 4, 5
Offset: 0

Views

Author

N. J. A. Sloane, May 13 2011

Keywords

Crossrefs

Cf. A007095 (base 9), A033046 (indices of 1's), A338090 (indices of 8's).
Cf. A054055 (maximal digit in decimal).

Programs

  • Mathematica
    a[n_] := Max[IntegerDigits[n, 9]]; (* Matej Veselovac, Jul 23 2021 *)
  • PARI
    a(n) = if (n, vecmax(digits(n, 9)), 0); \\ Michel Marcus, Jul 19 2020
    
  • Python
    from sympy.ntheory.digits import digits
    def a(n): return max(digits(n, 9)[1:])
    print([a(n) for n in range(105)]) # Michael S. Branicky, Jul 23 2021

Formula

From Matej Veselovac, Jul 23 2021: (Start)
a(n) = 1 iff n is in A033046.
a(n) = 8 iff n is in A338090. (End)

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
Previous Showing 11-14 of 14 results.