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

A146025 Numbers that can be written in bases 2, 3, 4, and 5 using only the digits 0 and 1.

Original entry on oeis.org

0, 1, 82000
Offset: 1

Views

Author

Daniel Mondot, Oct 26 2008

Keywords

Comments

Originally checked to 2^65520 (or about 3*10^19723) on Nov 07 2008. - Daniel Mondot, Jan 17 2016
Conjectured to be complete. a(4), if it exists, is greater than 10^15. - Charles R Greathouse IV, Apr 06 2012
Checked to 3125 (5^5) base-5 digits in just under 1/2 hour using a minor modification of the PARI program at A230360. Interestingly, with 5 replaced by 9 and the digits 2 and 3 permitted, it appears the complete set is--somewhat coincidental with this--{0, 1, 2, 3, 8281, 8282, 8283}, see A146026. - James G. Merickel, Dec 01 2013
Checked to 11 million decimal digits in 1 week using an algorithm that, upon finding that the current guess has non-{0,1} digits in a particular base, increases the guess to only have {0,1} digits in that base. C code in links. - Alex P. Klinkhamer, Aug 29 2015
It is a plausible conjecture that there are no more terms, but this has not been proved. - N. J. A. Sloane, Feb 06 2016

Examples

			82000 = 10100000001010000 (2) = 11011111001 (3) = 110001100 (4) = 10111000 (5).
		

Crossrefs

Intersection of A005836, A000695, and A033042.
Cf. A258981 (bases 2,3,4), A258107 (bases 2..n).

Programs

  • Mathematica
    f[n_] := Total[Total@ Drop[RotateRight[DigitCount[n, #]], 2] & /@ Range[3, 5]]; Select[Range[0, 100000], f@ # == 0 &] (* Michael De Vlieger, Aug 29 2015 *)
  • PARI
    is(n)=vecmax(digits(n,5))<2 && vecmax(digits(n,4))<2 && vecmax(digits(n,3))<2 \\ Charles R Greathouse IV, Aug 31 2015

Extensions

Edited by Charles R Greathouse IV, Nov 01 2009
Search limit extended to astronomical odds by James G. Merickel, Dec 03 2013
Search limit increased again with example code by Alex P. Klinkhamer, Aug 29 2015
Removed keywords "fini" and "full", since it is only a conjecture that there are no further terms. - N. J. A. Sloane, Feb 06 2016

A275600 Numbers that can be written in all bases from base 2 to base 6 using only the digits 0, 1 and 2.

Original entry on oeis.org

0, 1, 2, 6, 36, 37, 260, 1302, 1376, 1380, 1381, 1382, 1556, 1560, 1561, 1562, 16932, 562500, 562501, 562502, 562506, 562512, 562536, 562537, 562752, 562760, 23610752, 23610756, 23610757, 23610786, 23615750, 23615760, 23615761, 23615762, 23615785, 23615786, 23626310
Offset: 1

Views

Author

Sergio Pimentel, Aug 03 2016

Keywords

Comments

Is there any number that keeps this property also in base 7, other than the trivial cases 0,1,2?

Examples

			16932 is in the sequence because this number can be written in bases 2 through 6 using only the digits 0, 1 and 2: 16932(b4)  = 10020210 / (b5) = 1020212 / (b6) = 210220.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^6], Function[k, Max@ Flatten@ Map[IntegerDigits[k, #] &, Range[4, 6]] < 3]] (* or *)
    Select[Range[10^5], Function[k, Total@ Flatten@ Map[Take[RotateRight@ DigitCount[k, #], -(# - 3)] &, Range[4, 6]] == 0]] (* (not as efficient) Michael De Vlieger, Aug 03 2016 *)
  • PARI
    nextWithSmallDigits(n, base) = my (pow=1, rem=n, val=0, d); while (rem>0, d = rem % base; rem = rem \ base; if (d>2, val = 0; rem = rem+1, val = val + d*pow); pow = pow * base); return (val)
    { n = 0; prev = 0; while (n < 300, succ = prev; for (b=4,6, succ = nextWithSmallDigits(succ, b)); if (prev==succ, n = n+1; print(n " " prev); prev = succ+1, prev = succ)) } \\ Rémy Sigrist, Sep 08 2016
  • Perl
    use ntheory ":all"; my($x,$n10)=(0,0); while ($x < 50) { my $n = fromdigits( todigitstring($n10++, 3), 6);  next if vecany { $ > 2 } todigits($n, 4);  next if vecany { $ > 2 } todigits($n, 5);  print ++$x," $n\n"; } # Dana Jacobsen, Aug 16 2016
    
  • Python
    from gmpy2 import digits
    A275600_list = [n for n in (int(digits(m,3),6) for m in range(10**6)) if max(digits(n,5)) <= '2' and max(digits(n,4)) <= '2'] # Chai Wah Wu, Aug 15 2016
    

Extensions

a(18)-a(26) from Michael De Vlieger, Aug 03 2016
a(27)-a(37) from Chai Wah Wu, Aug 15 2016

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

Original entry on oeis.org

1, 5, 7, 13, 23, 53, 125, 215, 373, 1367, 1373, 1375, 3551, 4093, 5471, 5495, 5503, 30581, 30589, 32765, 32767, 56821, 56831, 89557, 96119, 96215, 96223, 97655, 98135, 98141, 98143, 98167, 98293, 98303, 351743, 352093, 521599, 521693, 521717, 521719, 524119, 524149, 875893, 875903, 884725, 884735
Offset: 1

Views

Author

Robin Powell, Oct 05 2015

Keywords

Comments

1, 7 and 32767 also share this property in base 2; their binary expansions consist only of a sequence of 1s.

Examples

			53 is 1222 in base 3 and 311 in base 4; it only uses the digit 1 or the largest digit in the two bases and is therefore a term.
Similarly 215 is 21222 in base 3 and 3113 in base 4 so it is also a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 1000000, Last@ DigitCount[#, 3] == 0 && Total@ Rest@ Drop[DigitCount[#, 4], {3}] == 0 &] (* Michael De Vlieger, Oct 05 2015 *)
    Join[{1,5},Flatten[Table[Select[FromDigits[#,3]&/@Tuples[{1,2},n], Union[ IntegerDigits[ #,4]] =={1,3}&],{n,20}]]] (* Harvey P. Dale, Jun 14 2016 *)
  • PARI
    is(n)=!setsearch(Set(digits(n,3)),0) && #setintersect(Set(digits(n,4)),[0,2])==0 \\ Charles R Greathouse IV, Oct 12 2015
    
  • 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] == '0':
                return(int(s[:i]+'1'*(m-i),4))
            if s[i] == '2':
                return(int(s[:i]+'3'+'1'*(m-i-1),4))
        return n
    A262958_list = []
    n = 1
    for i in range(10**4):
        m = f2(f1(n))
        while m != n:
            n, m = m, f2(f1(m))
        A262958_list.append(m)
        n += 1 # Chai Wah Wu, Oct 30 2015

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

A268337 Numbers which have only digits 0 and 1 in bases 3 and 5.

Original entry on oeis.org

0, 1, 30, 31, 756, 3250, 3276, 3280, 81255, 81256, 81280, 81900, 81901, 82000, 59078250, 59078251, 59078280, 59078281, 31789468750, 31789468776, 31789469505, 31789469506, 31789471900, 31789471905, 31789471906, 31789472005, 946095722031, 946095800025, 946095800026, 946095800031, 946095800130
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2016

Keywords

Comments

The number 82000 is famous for having only digits 0 and 1 in all bases <= 5, no other such number > 1 is known. See also A146025 and A258981.
If explicit formulas for (convenient) infinite subsequences of this one can be found, this could open new ways to progress on this problem.
The terms come in groups having roughly the first half (or at least third) of digits in common, see the link "Terms in base 10, 5 and 3".

Crossrefs

Programs

  • Maple
    d:= 20: # to get all terms < 5^d
    res:= NULL:
    T:= combinat:-cartprod([[$0..1]$d]):
    while not T[finished] do
      r:= T[nextvalue]();
      v:= add(r[i]*5^(d-i),i=1..d);
      if max(convert(v,base,3)) <= 1 then
        res:= res,v
      fi
    od:
    res; # Robert Israel, Feb 01 2016
  • Mathematica
    Module[{t=Tuples[{0,1},25],b3,b5},b3=FromDigits[#,3]&/@t;b5=FromDigits[ #,5]&/@t;Intersection[b3,b5]] (* The program generates the first 26 terms of the sequence. *) (* Harvey P. Dale, Dec 13 2021 *)
  • PARI
    print1(0);for(n=1,1e10,vecmax(digits(t=subst(Pol(binary(n)),'x,5),3))<2&&print1(","t))
    
  • PARI
    list(lim)=my(v=List([0]),d=digits(lim\1,5),t); for(i=1,#d, if(d[i]>1, for(j=i,#d, d[j]=1); break)); for(n=1,fromdigits(d,5), t=fromdigits(binary(n),5); if(vecmax(digits(t,3))<2, listput(v,t))); Vec(v) \\ Charles R Greathouse IV, Feb 02 2016

Formula

a(n) >> n^k with k = log 5/log 2 = 2.321928.... - Charles R Greathouse IV, Feb 02 2016

A263684 Numbers whose base-4 and base-5 representations have only 0's and 1's.

Original entry on oeis.org

0, 1, 5, 16400, 16401, 16405, 82000, 82001, 82005
Offset: 1

Views

Author

Robert Israel, Oct 23 2015

Keywords

Comments

Intersection of A000695 and A033042.
These appear to be all the terms. There are no more below 10^500.

Examples

			16400 is 10000100 in base 4 and 1011100 in base 5.
		

Crossrefs

Programs

  • Maple
    split:= proc(ab, B)
       local a,b,La, Lb, k, j, a1,  a2, b1, b2, x;
       global Res, count;
       a:= ab[1]; b:= ab[2];
       if b-a <= 1000 then
          for x from a to b-1 do
            if max(convert(x,base,4)) <= 1 and max(convert(x,base,5)) <= 1 then
               count:= count+1; Res[count]:= x
            fi
          od;
          return ({});
       fi;
       La:= convert(a,base,B);
       Lb:= convert(b,base,B);
       if nops(Lb) > nops(La) then La:= [op(La),0$(nops(Lb)-nops(La))] fi;
       k:= ListTools:-SelectLast(`>`,Lb-La,0,output=indices);
       if La[k] = 0 then
         a1:= a;
         b1:= 2 + add(B^i,i=1..k-2) + add(La[i]*B^(i-1),i=k+1..nops(La));
         a2:= B^(k-1) + add(La[i]*B^(i-1),i=k+1..nops(La));
         b2:= min(b, b1 + B^(k-1));
         return(select(t -> (t[1] t[1] 0 do
       Cands:= map(op@split, Cands, 5);
       Cands:= map(op@split, Cands, 4);
    od:
    sort(convert(Res,list));
  • Mathematica
    Select[Range[0,83000],Max[Join[IntegerDigits[#,4],IntegerDigits[#,5]]]<2&] (* Harvey P. Dale, Sep 04 2018 *)
  • PARI
    isok(n) = (n==0) || ((vecmax(digits(n,4))<=1) && (vecmax(digits(n,5))<=1)); \\ Michel Marcus, Oct 24 2015
Showing 1-7 of 7 results.