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.

A364049 a(n) is the least k such that the base-n digits of 2^k are not all distinct.

Original entry on oeis.org

2, 2, 4, 5, 6, 3, 6, 11, 16, 14, 11, 12, 8, 4, 8, 15, 16, 12, 16, 18, 9, 17, 15, 14, 24, 13, 16, 15, 10, 5, 10, 19, 24, 14, 21, 15, 18, 15, 19, 17, 17, 28, 18, 12, 24, 23, 31, 24, 31, 20, 26, 44, 35, 33, 25, 18, 36, 14, 14, 18, 12, 6, 12, 23, 45, 37, 38, 24, 20, 35, 36, 26, 51, 31, 33, 47, 34, 34
Offset: 2

Views

Author

Robert Israel, Jul 03 2023

Keywords

Examples

			a(10) = 16 because 2^16 = 65536 does not have all distinct digits in base 10, while 2^k does have all distinct digits for 1 <= k <= 15.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k,L;
      for k from 2 do
        L:= convert(2^k,base,n);
        if nops(L) <> nops(convert(L,set)) then return k fi
      od;
    end proc:
    map(f, [$2..100]);
  • Python
    from itertools import count
    from sympy.ntheory import digits
    def a(n): return next(k for k in count(2) if len(set(d:=digits(1<Michael S. Branicky, Jul 05 2023

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

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)

A352721 Perfect cubes whose decimal digits appear in nonincreasing order.

Original entry on oeis.org

0, 1, 8, 64, 1000, 8000, 64000, 1000000, 8000000, 64000000, 1000000000, 8000000000, 64000000000, 1000000000000, 8000000000000, 64000000000000, 1000000000000000, 8000000000000000, 64000000000000000, 1000000000000000000, 8000000000000000000, 64000000000000000000
Offset: 1

Views

Author

Antonio Roldán, Mar 30 2022

Keywords

Examples

			64 is in the sequence because it is a perfect cube (64 = 4^3) whose digits appear in nonincreasing order.
		

Crossrefs

Intersection of A000578 and A009996.

Programs

  • Mathematica
    Select[Range[0, 4*10^6]^3, Max@ Differences[IntegerDigits[#]] <= 0 &] (* Amiram Eldar, Mar 30 2022 *)
  • PARI
    ok(n) = digits(n) == vecsort(digits(n),,4) && ispower(n,3)

Formula

a(n) = A004647(n-1)^3.
Showing 1-4 of 4 results.