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.

A262963 List of numbers n whose base-3 expansion contains only the digits 1 and 2 and whose base-4 expansion contains only the digits 2 and 3.

This page as a plain text file.
%I A262963 #20 Oct 31 2015 00:35:39
%S A262963 2,14,43,238,239,698,4010,4090,4091,4094,10922,12031,12271,12283,
%T A262963 174842,174847,176062,176063,977578,977579,981679,981691,981931,
%U A262963 981934,981935,981950,1043114,1043194,1043195,1043198,3129259,3129262,3129263,3129322,3129323,3129326,3129343
%N A262963 List of numbers n whose base-3 expansion contains only the digits 1 and 2 and whose base-4 expansion contains only the digits 2 and 3.
%H A262963 Chai Wah Wu, <a href="/A262963/b262963.txt">Table of n, a(n) for n = 1..10000</a>
%e A262963 43 is 1121 in base 3 and 223 in base 4; it uses the two largest digits in the two bases and is therefore a term.
%e A262963 Similarly 238 is 22211 in base 3 and 3232 in base 4 so it is also a term.
%o A262963 (Python)
%o A262963 from gmpy2 import digits
%o A262963 def f1(n):
%o A262963     s = digits(n,3)
%o A262963     m = len(s)
%o A262963     for i in range(m):
%o A262963         if s[i] == '0':
%o A262963             return(int(s[:i]+'1'*(m-i),3))
%o A262963     return n
%o A262963 def f2(n):
%o A262963     s = digits(n,4)
%o A262963     m = len(s)
%o A262963     for i in range(m):
%o A262963         if s[i] in ['0','1']:
%o A262963             return(int(s[:i]+'2'*(m-i),4))
%o A262963     return n
%o A262963 A262963_list = []
%o A262963 n = 1
%o A262963 for i in range(10**4):
%o A262963     m = f2(f1(n))
%o A262963     while m != n:
%o A262963         n, m = m, f2(f1(m))
%o A262963     A262963_list.append(m)
%o A262963     n += 1 # _Chai Wah Wu_, Oct 30 2015
%Y A262963 Cf. A258981, A261970, A262958.
%K A262963 nonn,base
%O A262963 1,1
%A A262963 _Robin Powell_, Oct 05 2015