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

A364089 a(n) is the greatest k such that the base-n digits of 2^k are all distinct.

Original entry on oeis.org

1, 1, 3, 4, 5, 8, 5, 10, 29, 19, 19, 19, 16, 18, 7, 43, 41, 37, 45, 39, 55, 33, 43, 60, 35, 61, 56, 50, 44, 69, 9, 64, 44, 80, 43, 88, 53, 71, 56, 68, 59, 78, 76, 74, 95, 109, 111, 81, 86, 136, 117, 75, 98, 83, 84, 99, 104, 116, 95, 118, 60, 81, 11, 119, 119, 172, 140, 97, 105, 113, 93, 122, 92
Offset: 2

Views

Author

Robert Israel, Jul 04 2023

Keywords

Comments

a(n) <= log_2(A062813(n)).

Examples

			a(10) = 29 because all decimal digits of 2^29 = 536870912 are distinct.
		

Crossrefs

Programs

  • Maple
    f:= proc(b) local M,k,L;
      M:= b^b - (b^b-b)/(b-1)^2;
      for k from ilog2(M) to 1 by -1 do
        L:= convert(2^k,base,b);
        if nops(L) = nops(convert(L,set)) then return k fi
      od
    end proc:
    map(f, [$2..100]);
  • Python
    from sympy.ntheory.factor_ import digits
    def A364089(n):
        m = 1<<(l:=((r:=n**n)-(r-n)//(n-1)**2).bit_length()-1)
        while len(d:=digits(m,n)[1:]) > len(set(d)):
            l -= 1
            m >>= 1
        return l # Chai Wah Wu, Jul 07 2023

A004654 Powers of 2 written in base 15. (Next term contains a non-decimal character.)

Original entry on oeis.org

1, 2, 4, 8, 11, 22, 44, 88, 121, 242, 484, 918, 1331, 2662
Offset: 0

Views

Author

Keywords

Comments

a(14) is defined as "2^14 written in base 15". However, the base-15 digits of 2^14 are [4,12,12,4]. The standard convention of using letters A, B, ... to represent digits > 9, cannot be used in the Data sections of OEIS entries. One possibility to encode such terms within the given constraints and without affecting the earlier terms would be to use 00, 10, 20, ..., 50 to represent unambiguously the digits 0, 10, 11, ..., 14. - M. F. Hasler, Jun 22 2018.
This sequence makes a nice puzzle. It would be possible to allow non-decimal characters by using pairs of decimal digits instead of single digits, but this would spoil the beauty of the puzzle. - N. J. A. Sloane, Jun 25 2018

Crossrefs

Cf. A000079, A004643, ..., A004655: powers of 2 written in base 10, 4, 5, ..., 16.
Cf. A000244, A004656, A004658, A004659, ...: powers of 3 in base 10, 2, 4, 5, ...

Programs

  • PARI
    apply( a(n,b=15,m=2)=fromdigits(digits(m^n,b)), [0..13]) \\ This sums the base-15 digits multiplied by powers of 10. Digits > 9 occurring for n >= 14 will carry over to the left (4CC4 -> 5324). - M. F. Hasler, Jun 22 2018

A004667 Powers of 3 written in base 13. (Next term contains a non-decimal digit.)

Original entry on oeis.org

1, 3, 9, 21, 63, 159, 441
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A000079, A004643, ..., A004655: powers of 2 written in base 10, 4, 5, ..., 16.
Cf. A000244, A004656, A004658, A004659, ..., A004668: powers of 3 in base 10, 2, 4, 5, ..., 26.

Programs

  • Mathematica
    FromDigits[IntegerDigits[#,13]]&/@(3^Range[0,6]) (* Harvey P. Dale, Mar 05 2018 *)
  • PARI
    apply( a(n, b=13, m=3)=fromdigits(digits(m^n, b)), [0..6]) \\ This implements one possible continuation of the sequence beyond n = 6: write digits in decimal and carry over (so CC4 -> 12*100 + 12*10 + 4 = 1324). - M. F. Hasler, Jun 22 2018

A004669 Powers of 3 written in base 27.

Original entry on oeis.org

1, 3, 9, 10, 30, 90, 100, 300, 900, 1000, 3000, 9000, 10000, 30000, 90000, 100000, 300000, 900000, 1000000, 3000000, 9000000, 10000000, 30000000, 90000000, 100000000, 300000000, 900000000, 1000000000
Offset: 0

Views

Author

Keywords

Comments

Similar to powers of 2 in base 8 (A004647) or 16 (A004655). - M. F. Hasler, Jun 22 2018

Crossrefs

Cf. A000079, A004643, ..., A004655: powers of 2 written in base 10, 4, 5, ..., 16.
Cf. A000244, A004656, A004658, A004659, ..., A004668: powers of 3 in base 10, 2, 4, 5, ..., 26.

Programs

  • Mathematica
    Table[FromDigits[IntegerDigits[3^n, 27]], {n, 0, 100}] (* G. C. Greubel, Oct 12 2018 *)
  • PARI
    apply( a(n)=3^(n%3)*10^(n\3), [0..20]) \\ M. F. Hasler, Jun 22 2018

Formula

a(n) = 3^(n mod 3)*10^floor(n/3). - M. F. Hasler, Jun 22 2018
From Chai Wah Wu, Sep 03 2020: (Start)
a(n) = 10*a(n-3) for n > 2.
G.f.: (-9*x^2 - 3*x - 1)/(10*x^3 - 1). (End)

A372880 a(1) = 1; a(2) = 3; for n > 2, a(n) is the smallest proper multiple of a(n-1) that contains a(n-2) as subsequence of its digits.

Original entry on oeis.org

1, 3, 12, 36, 612, 1836, 168912, 10810368, 16366897152, 51703028103168, 1563447866811697152, 23520172003575940628103168, 1155558163424267804668132116971520, 12369352104691609178206055357839959406281031680
Offset: 1

Views

Author

Bryle Morga, May 15 2024

Keywords

Comments

It is unknown whether a(n+1)/a(n) -> oo as n -> oo.
The same rule starting from terms 1, 2 gives A004643 and its multiples are as easy as A004643(n+1)/A004643(n) = 2 or 5 alternately.

Examples

			a(7) = 168912; 16812 = 92*1836 = 92*a(6) and "16812" contains a(5) = 612 as a subsequence.
		

Crossrefs

Cf. A004643.

Programs

  • C
    /* See links. */
  • Python
    def subseq(x,y):
        i = 0
        j = 0
        while i != len(x) and j != len(y):
            if x[i] == y[j]:
               i += 1
            j += 1
        return i == len(x)
    def a(n):
        if n == 1:
            return 1
        A = 1
        B = 3
        for _ in range(n-2):
            s = str(A)
            i = 1
            while not subseq(s, str(B*i)):
                i += 1
            A, B = B, B*i
        return B
    
  • Python
    from itertools import count, islice
    def is_subseq(s, p):
        while s and p:
            if p%10 == s%10: s //= 10
            p //= 10
        return s == 0
    def agen(): # generator of terms
        an2, an1 = [1, 3]
        yield from [an2, an1]
        while True:
            an = next(i*an1 for i in count(1) if is_subseq(an2, i*an1))
            an2, an1 = an1, an
            yield an
    print(list(islice(agen(), 11))) # Michael S. Branicky, May 15 2024
    

Formula

a(n) <= a(n-2)*10^k + (a(n-1) - (a(n-2)*10^k mod a(n-1))), where k is the number of decimal digits in a(n-1). - Michael S. Branicky, May 17 2024

Extensions

a(12)-a(13) from Michael S. Branicky, May 15 2024
a(14) from Kevin Ryde, Jun 23 2024

A305396 Records in A171797.

Original entry on oeis.org

101, 110, 211, 220, 321, 330, 431, 440, 541, 550
Offset: 1

Views

Author

N. J. A. Sloane, Jun 25 2018

Keywords

Comments

The record-holders are the powers of 2 written in base 4, A004643.

References

  • M. E. Coppenbarger, Iterations of a modified Sisyphus function, Fib. Q., 56 (No. 2, 2018), 130-141.

Crossrefs

Previous Showing 11-16 of 16 results.