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 21-22 of 22 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

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

Original entry on oeis.org

1, 2, 4, 8, 12, 24, 48, 92, 144, 288, 532
Offset: 0

Views

Author

Keywords

Comments

Next term contains a non-decimal character if such characters are chosen to represent digits > 9, where "digit" means the coefficients in N = Sum_{k>=0} d_k * b^k. This isn't possible here, but digits 0, 10, ..., 13 could be represented, e.g., using 00, 10, ..., 40. This would not affect a(0)..a(10), which don't have a digit 0. - M. F. Hasler, Jun 25 2018

Crossrefs

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

Programs

  • Mathematica
    BaseForm[Table[2^n, {n, 0, 10}], 14] (* Alonso del Arte, Mar 18 2005 *)
  • PARI
    apply( a(n)=fromdigits(digits(2^n,14)), [0..10]) \\ This yields Sum d[k]*10^k where d[k] are the base 14 digits. To get strings possibly containing letters 'A'..'D' replace fromdigits(...) by Strchr(apply(d->48+d+(d>9)*7,...)). - M. F. Hasler, Jun 25 2018
Previous Showing 21-22 of 22 results.