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

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

A303788 a(n) = Sum_{i=0..m} d(i)*5^i, where Sum_{i=0..m} d(i)*6^i is the base-6 representation of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 25, 26, 27, 28, 29, 30, 25, 26, 27, 28, 29, 30, 30, 31, 32, 33, 34, 35, 35, 36, 37, 38, 39, 40, 40, 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 50, 51, 52, 53, 54, 55
Offset: 0

Views

Author

Seiichi Manyama, Apr 30 2018

Keywords

Examples

			16 = 24_6, so a(16) = 2*5 + 4 = 14.
17 = 25_6, so a(17) = 2*5 + 5 = 15.
18 = 30_6, so a(18) = 3*5 + 0 = 15.
19 = 31_6, so a(19) = 3*5 + 1 = 16.
		

Crossrefs

Sum_{i=0..m} d(i)*b^i, where Sum_{i=0..m} d(i)*(b+1)^i is the base (b+1) representation of n: A065361 (b=2), A215090 (b=3), A303787 (b=4), this sequence (b=5), A303789 (b=6).
Cf. A037465.

Programs

  • PARI
    a(n) = fromdigits(digits(n, 6), 5); \\ Michel Marcus, May 02 2018
  • Ruby
    def f(k, ary)
      (0..ary.size - 1).inject(0){|s, i| s + ary[i] * k ** i}
    end
    def A(k, n)
      (0..n).map{|i| f(k, i.to_s(k + 1).split('').map(&:to_i).reverse)}
    end
    p A(5, 100)
    

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