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

A261970 Numbers whose base-b expansions, for both b=3 and b=4, include no digits other than 0 and b-1.

Original entry on oeis.org

0, 60, 240, 13308, 52992, 53052, 53196, 3195132, 3208140, 3346188, 12795648, 12795900, 871563264, 871563312, 871563456, 871576368, 871576380, 871576524, 871615728, 871616268, 871616448, 1072939776, 1072939788, 1072939824, 3225157884, 3472949196, 3473670912
Offset: 1

Views

Author

Robin Powell, Sep 21 2015

Keywords

Examples

			60 is 2020 in base 3 and 330 in base 4; it uses the largest digits in the two bases (including 0's) and is therefore a term.
Similarly 240 is 22220 in base 3 and 3300 in base 4 so it is also a term.
		

Crossrefs

Programs

  • PARI
    isokb(n, b) = {if (!n, return (1)); my(d = digits(n, b)); (#vecsort(d,,8)==2) && (vecmin(d) == 0) && (vecmax(d) == b - 1);}
    isok(n) = isokb(n, 3) && isokb(n, 4); \\ Michel Marcus, Sep 22 2015

Extensions

More terms from Alois P. Heinz, Sep 21 2015

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.

Original entry on oeis.org

2, 14, 43, 238, 239, 698, 4010, 4090, 4091, 4094, 10922, 12031, 12271, 12283, 174842, 174847, 176062, 176063, 977578, 977579, 981679, 981691, 981931, 981934, 981935, 981950, 1043114, 1043194, 1043195, 1043198, 3129259, 3129262, 3129263, 3129322, 3129323, 3129326, 3129343
Offset: 1

Views

Author

Robin Powell, Oct 05 2015

Keywords

Examples

			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.
Similarly 238 is 22211 in base 3 and 3232 in base 4 so it is also a term.
		

Crossrefs

Programs

  • Python
    from gmpy2 import digits
    def f1(n):
        s = digits(n,3)
        m = len(s)
        for i in range(m):
            if s[i] == '0':
                return(int(s[:i]+'1'*(m-i),3))
        return n
    def f2(n):
        s = digits(n,4)
        m = len(s)
        for i in range(m):
            if s[i] in ['0','1']:
                return(int(s[:i]+'2'*(m-i),4))
        return n
    A262963_list = []
    n = 1
    for i in range(10**4):
        m = f2(f1(n))
        while m != n:
            n, m = m, f2(f1(m))
        A262963_list.append(m)
        n += 1 # Chai Wah Wu, Oct 30 2015

A266001 Numbers with no 0's in their base 3 and base 4 expansions.

Original entry on oeis.org

1, 2, 5, 7, 13, 14, 22, 23, 25, 26, 41, 43, 53, 121, 122, 125, 149, 151, 157, 158, 214, 215, 229, 230, 233, 238, 239, 365, 367, 373, 374, 377, 445, 446, 473, 475, 485, 607, 617, 619, 634, 635, 637, 638, 697, 698, 701, 725, 727, 1366, 1367, 1373, 1375, 1429, 1430, 1445, 1447, 1453, 1454
Offset: 1

Views

Author

Robin Powell, Jan 27 2016

Keywords

Comments

Intersection of A023705 and A032924.
1, 7 and 32767 also share this property in base 2.

Examples

			53 is 1222 in base 3 and 311 in base 4; no zeros are shown in either representation and so 53 is a term.
Similarly, 121 is 11111 in base 3 and 1321 in base 4 so it is also a term.
		

Crossrefs

Programs

  • PARI
    isokd(n) = vecmin(digits(n, 3)) && vecmin(digits(n, 4)); \\ Michel Marcus, Jan 28 2016
    
  • Python
    from _future_ import division
    from gmpy2 import digits
    A266001_list = [j for j in (int(format(i,'b'),3)+(3**n-1)//2 for n in range(1,10) for i in range(2**n)) if '0' not in digits(j,4)] # Chai Wah Wu, Feb 13 2016
Showing 1-3 of 3 results.