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-10 of 12 results. Next

A258107 Smallest number > 1 whose representation in all bases up to n consists only of 0's and 1's.

Original entry on oeis.org

2, 3, 4, 82000
Offset: 2

Views

Author

Bernardo Boncompagni, May 20 2015

Keywords

Comments

As with A146025, it is a plausible conjecture that there are no more terms, but this has not been proved. - Daniel Mondot, Dec 16 2016
From Devansh Singh, Mar 14 2021: (Start)
If a(n) exists then b-1|(N-Sum_{i>=0} A(i)), b-2|(N-Sum_{i>=0} A(i)*2^i), b-3|(N-Sum_{i>=0} A(i)*3^i), ... where b <= n.
If a(n) exists for n > 5 then let it be N. N = Sum_{i>=0} A(i)*b^i where A(i) is the i-th digit (0 or 1 only) of N starting from the right in base b <= n.
N = Sum_{i>=0} A(i)*b'^i + Sum_{i>=1} A(i)*(b^i - b'^i), where b' < b. If b=6 then we can see that 5|(N-Sum_{i>=0} A(i)), 4|(N-Sum_{i>=0} A(i)*2^i), 3|(N-Sum_{i>=0} A(i)*3^i). (End)

Examples

			a(4) = 4 because it is 100 in base 2, 11 in base 3 and 10 in base 4. No smaller number, except 1, can be expressed in such bases with only 0's and 1's.
a(5) = 82000: 82000 in bases 2 through 5 is 10100000001010000, 11011111001, 110001100, 10111000, containing only 0's and 1's, while all smaller numbers have a larger digit in one of those bases. For example, 12345 is 11000000111001, 121221020, 3000321, 343340. - _N. J. A. Sloane_, Feb 01 2016
		

Crossrefs

Cf. A146025.

Programs

  • Mathematica
    Table[k = 2; While[Total[Total@ Drop[RotateRight[DigitCount[k, #]], 2] & /@ Range[3, n]] > 0, k++]; k, {n, 2, 5}] (* Michael De Vlieger, Aug 29 2015 *)

A258981 Numbers containing only 1's and 0's in their base-2, base-3, and base-4 representations.

Original entry on oeis.org

0, 1, 4, 81, 84, 85, 256, 273, 324, 325, 336, 337, 1089, 1092, 1093, 20496, 20497, 20736, 20737, 20740, 65620, 65856, 65857, 81921, 81984, 81985, 82000, 86032, 86277, 86292, 86293, 86356, 262468, 262480, 263169
Offset: 1

Views

Author

Phil Lane, Jun 15 2015

Keywords

Comments

As a trend in the first 1000 numbers in the sequence, there tend to be clusters of these numbers, with very large gaps where a number with this property cannot be found.
This sequence lists the numbers that are counted in A230360. - Matthew Goers, Jul 11 2015
Note that a(27) = 82000 also contains no digit > 1 in base 5, see A146025. - Matthew Goers, Jul 11 2015
Numbers that can be expressed both as a sum of distinct powers of 3 and as a sum of distinct powers of 4. - Antti Karttunen, Aug 18 2015

Examples

			81 is 10000 in base 3 and 1101 in base 4 so 81 is a term.
273 is 101010 in base 3 and 10101 in base 4 so 273 is a term.
		

Crossrefs

Intersection of A000695 and A005836.

Programs

  • Maple
    N:= 20: # to get all terms < 2*4^(N-1)
    g:= proc(n)
    local L, j, m, a;
    L:= convert(n,base, 2);
    a:= add(4^(j-1)*L[j],j=1..nops(L));
    if has(convert(a,base,3),2) then NULL else a fi
    end proc:
    map(g, [$0..2^N]); # Robert Israel, Jul 14 2015
  • Mathematica
    ok3[n_] := 1 == Max@ IntegerDigits[n, 3]; to4[n_] := FromDigits[ IntegerDigits[n, 2], 4]; Select[to4/@ Range[2^20], ok3] (* Giovanni Resta, Jun 16 2015 *)
  • PARI
    digitsb(m)=vecsort(concat(digits(m,3),digits(m,4)),,8)
    is_ok(n)={my(v=digitsb(n),r=0, i);for(i=2,9,r = r || vecsearch(v,i));!r}
    first(m)={ my(v=vector(m),i,k=0);for(i=1, m, while(!is_ok(k), k++); v[i] = k;k++); v;} /* Anders Hellström, Jul 19 2015 */
    
  • PARI
    isok(n) = (n==0) || ((vecmax(digits(n,3)) < 2) && (vecmax(digits(n,4)) < 2)); \\ Michel Marcus, Aug 05 2015
    
  • PARI
    print1(0);for(n=1,1e5,vecmax(digits(t=subst(Pol(binary(n)),'x,4),3))<2&&print1(","t)) \\ M. F. Hasler, Feb 01 2016
    
  • PARI
    \\ See links too.
    
  • Python
    def digits(n, b=10): # digits of n in base 2 <= b <= 62
        x, y = n, ''
        while x >= b:
            x, r = divmod(x,b)
            y += str(r) if r < 10 else (chr(r+87) if r < 36 else chr(r+29))
        y += str(x) if x < 10 else (chr(x+87) if x < 36 else chr(x+29))
        return y[::-1]
    A258981_list = [n for n in (int(format(d,'b'),4) for d in range(10**4)) if max(digits(n,3)) <= '1'] # Chai Wah Wu, Aug 13 2015
  • Sage
    [0]+[n for n in [1..1000000] if max(n.digits(base=3))==1 and max(n.digits(base=4))==1] # Tom Edgar, Jul 11 2015
    

A146026 Numbers that can be written from base 2 to base 9 using only the digits 0 to 3.

Original entry on oeis.org

0, 1, 2, 3, 8281, 8282, 8283
Offset: 1

Views

Author

Daniel Mondot, Oct 27 2008

Keywords

Comments

Conjectured to be complete.
Checked up to 2^16384 (≈ 1.2*10^4932) on Oct 31 2008. - Daniel Mondot, Jan 17 2016
Checked up to 2^65520 (≈ 3*10^19723) on Nov 13 2008. - Daniel Mondot, Jan 17 2016
It is a plausible conjecture that there are no more terms, but this has not been proved. - N. J. A. Sloane, Nov 17 2017

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 10^5], Function[n, Times @@ Boole@ Map[Max@ IntegerDigits[n, #] <= 3 &, Range[2, 9]] > 0]] (* Michael De Vlieger, Aug 15 2016 *)

A146027 Numbers that can be written from base 2 to base 10 using only the digits 0 to 4.

Original entry on oeis.org

0, 1, 2, 3, 4, 10, 100, 140004, 140304, 140312, 1131032, 1131033, 1131034, 1131040
Offset: 1

Views

Author

Daniel Mondot, Oct 26 2008

Keywords

Comments

Conjectured to be complete.
Checked on Oct 31 2008 up to 2^16384 (or 1.2*10^4932). - Daniel Mondot, Jan 17 2016
No more entries < 10^78. - Robert Israel, Aug 31 2015
It is a plausible conjecture that there are no more terms, but this has not been proved. - N. J. A. Sloane, Nov 17 2017

Crossrefs

Programs

  • Maple
    imax:= 20: # to consider numbers < 6^imax
    L:= Matrix(5,imax):
    Delta:= proc(L,b)
      local i,j,m,Lloc;
      if max(L) <= 4 then return 0 fi;
      Lloc:= L;
      m:= 0;
      for j from 1 to imax while max(Lloc[j..imax]) > 4 do
              m:= m + b^(j-1)*(b-Lloc[j]);
              if j < imax then Lloc[j+1]:= Lloc[j+1]+1 fi
      od;
      m
    end proc:
    n:= 0: count:= 1: A[1]:= 0:
    isdone:= false;
    while max(L[..,imax]) < 5 and not isdone do
      n:= n+1;
      L[..,1]:= L[..,1]+<1,1,1,1,1>;
      m:= max(seq(Delta(L[b-5,..],b),b=6..10));
      while m > 0 and not isdone do
        n:= n+m;
        for b from 6 to 10 do
           Lb:= convert(n,base,b);
           if nops(Lb) > imax then isdone:= true; break fi;
           L[b-5,1..nops(Lb)]:= Vector[row](Lb);
        od:
        m:= max(seq(Delta(L[b-5,..],b),b=6..10));
      od;
      if not isdone then
        count:= count+1;
        A[count]:= n;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Aug 31 2015
  • Mathematica
    f[n_] := Total[Total@ Drop[RotateRight[DigitCount[n, #]], 5] & /@ Range[6, 10]]; Select[Range[0, 1200000], f@ # == 0 &] (* Aug 29 2015, or *)
    Select[Range[0, 1200000], Function[n, Times @@ Boole@ Map[Max@ IntegerDigits[n, #] <= 4 &, Range[2, 10]] > 0]] (* Michael De Vlieger, Aug 15 2016 *)
  • PARI
    isok(n) = if (n, for (b=6, 10, if (vecmax(digits(n,b))>4, return(0)))); 1; \\ Michel Marcus, Aug 30 2015

Extensions

Edited by Charles R Greathouse IV, Nov 01 2009

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

A131646 Numbers that can be written from base 2 to base 18 using only the digits 0 to 9 (conjectured to be complete).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 18, 19, 20, 1027, 1028, 1029, 14745, 9020076688681, 9439828025162228377, 9439829801208141318
Offset: 1

Views

Author

Daniel Mondot, Sep 08 2007, Nov 02 2008

Keywords

Comments

Originally checked to 2^20356 (or 5.8*10^6127) in Nov 2008.
It appears that 19 and 20 are the only numbers > 9 that can be written up to base 19 only using digits 0 to 9 and 20 is the only number > 9 that can be written up to base 20 only using digits 0 to 9.
It is a plausible conjecture that there are no more terms, but this has not been proved. - N. J. A. Sloane, Nov 17 2017

References

  • B. R. Barwell, Numbers Without Letters, Journal of Recreational Mathematics, Vol. 25:3 (1993), 174-179.

Crossrefs

Programs

  • Mathematica
    f[n_] := Total[Total@ Drop[RotateRight[DigitCount[n, #]], 10] & /@ Range[11, 18]]; Select[Range[0, 20000], f@ # == 0 &] (* Michael De Vlieger, Aug 29 2015 *)
  • PARI
    isok(n) = if (n, for (b=11, 18, if (vecmax(digits(n,b))>9, return(0)))); 1; \\ Michel Marcus, Aug 30 2015

Extensions

Edited by Charles R Greathouse IV, Nov 01 2009
Reference added by William Rex Marshall, Oct 23 2011

A146028 Numbers that can be written from base 2 to base 15 using only the digits 0 to 7.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 15, 16, 174731235562130, 174731235562131, 174731235562132, 174731235562143, 174731235562147, 174731235562170, 174731235562171, 174731235564710, 174731235564711, 174731236371006, 25354527232277132536350, 25354527232277132536351
Offset: 1

Views

Author

Daniel Mondot, Nov 02 2008, Nov 06 2008

Keywords

Comments

It is a plausible conjecture that there are no more terms, but this has not been proved. - N. J. A. Sloane, Nov 17 2017

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 10^5], Function[n, Times @@ Boole@ Map[Max@ IntegerDigits[n, #] <= 7 &, Range[2, 15]] > 0]] (* Michael De Vlieger, Aug 15 2016 *)

A146029 Numbers that can be written from base 2 to base 17 using only the digits 0 to 8 (conjectured to be complete).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18
Offset: 1

Views

Author

Daniel Mondot, Nov 02 2008

Keywords

Comments

It is a plausible conjecture that there are no more terms, but this has not been proved. - N. J. A. Sloane, Nov 17 2017

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 10^5], Function[n, Times @@ Boole@ Map[Max@ IntegerDigits[n, #] <= 8 &, Range[2, 17]] > 0]] (* Michael De Vlieger, Aug 15 2016 *)

A230360 a(n) is the number of base-4 n-digit numbers requiring only binary digits in bases 3 and 4.

Original entry on oeis.org

2, 1, 0, 3, 6, 3, 0, 5, 12, 11, 0, 5, 12, 0, 0, 5, 0, 0, 0, 48, 14, 0, 61, 188, 83, 0, 81, 232, 268, 0, 0, 650, 0, 0, 622, 299, 0, 0, 0, 501, 0, 0, 2655, 602, 0, 6429, 8990, 7856, 0, 26187, 17898, 3744, 0, 40300, 16395, 0, 0, 0, 0, 0, 0, 124876, 173552, 0, 0
Offset: 1

Views

Author

James G. Merickel, Oct 16 2013

Keywords

Comments

0 is included to mesh with the earlier A146025 ({0, 1, 82000}: the values in decimal with top base 4 here replaced by 5, conjectured complete). It appears unlikely, empirically, that this sequence has a last positive term, and a heuristic approximation of terms is likely not difficult.
The numbers here are the counts of members of A000695 also occurring in A005836 and being n digits in length in base-4.

Examples

			The first 8 values are 0, 1, 4, 81, 84, 85, 256 and 273--0, 1, 11, 10000, 10010, 10011, 10000111 and 10001010 in base 3, and 0, 1, 10, 1101, 1110, 1111, 10000 and 10101 in base 4; and, from the base-4 listing, a(1)=2, a(2)=1, a(3)=0, a(4)=3, and a(5) is at least 2.
		

Crossrefs

Programs

  • Mathematica
    MapAt[# + 1 &, Array[Count[FromDigits[#, 4] & /@ IntegerDigits[Range[2^(# - 1), 2^# - 1], 2], ?(DigitCount[#, 3][[2]] == 0 &)] &, 20], 1] (* _Michael De Vlieger, Jun 11 2019 *)
  • PARI
    {
    \\ This program finds the number of d-digit base B>b\\
    \\ numbers not requiring digits beyond those of base b\\
    \\ for bases b+1 through B. It runs a check in reverse\\
    \\ down to base b+1, maintaining additions not yet done\\
    \\ in vector S, where the digits in each base are kept\\
    \\ in matrix N.  The value itself is kept as n, at each\\
    \\ new base checked for n, the value in S is transfered\\
    \\ to variable t; with the check being done of whether\\
    \\ the criterion is satisfied for n in the base under\\
    \\ consideration.  A flag f is used to see if n passed\\
    \\ for all bases or there was a break.  If pass, then\\
    \\ count variable c is incremented (as is n) for the\\
    \\ next run through bases.  At each addition, a check\\
    \\ of whether the base is B and the number of digits\\
    \\ changes is done, and if so a new term is output.\\
    \\ pos and POS are variables for the digit-positions\\
    \\ under consideration in additions essentially mimic-\\
    \\ king hand addition.  Flag g identifies whether or\\
    \\ not a large addition is warranted by virtue of an\\
    \\ addition resulting in a digit larger than b-1, the\\
    \\ leftmost of these being the point from which this\\
    \\ addition is made using variable s calculated four\\
    \\ lines above the bottom one of the program.  This \\
    \\ program is readily modified  to store a smaller #\\
    \\ of digits (D), change the b and B values, and print\\
    \\ specific n values as desired.\\
    b=2;B=4;d=1;c=1;D=10000;
    N=matrix(B-b,D);n=1;S=vector(B-b,x,1);
    while(1,
      f=1;forstep(i=B,b+1,-1,
        t=S[i-b];if(t,
          S[i-b]=0;pos=0;ca=0;
          while(t,
            pos++;N[i-b,pos]+=t%i+ca;
            if(N[i-b,pos]>=i,ca=1;N[i-b,pos]-=i,ca=0);
            t\=i);
          if(ca,pos++;N[i-b,pos]++;if(i==B,if(pos==d+1,
                print1(c",");d++;c=0)));
          POS=pos;g=1;
          while(POS,
            if(N[i-b,POS]>=b,g=0;break(),POS--));
          if(g==0,
            f=0;POS++;while(N[i-b,POS]==b-1,POS++);
            N[i-b,POS]++;for(j=1,POS-1,N[i-b,j]=0);
            s=i^(POS-1)-n%(i^(POS-1));
            for(j=1,B-b,if(j!=i-b,S[j]+=s));
            if(i==B,if(POS==d+1,print1(c",");d++;c=0));
            n+=s;break())));
      if(f,c++;n++;S=vector(B-b,x,1)))
    }

A258946 Numbers that can be expressed using only the digits 0 and 1 in no more than three different bases.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 18, 19, 22, 23, 24, 29, 32, 33, 34, 35, 38, 41, 44, 45, 46, 47, 48, 51, 52, 53, 54, 55, 58, 59, 60, 61, 62, 63, 66, 67, 70, 71, 74, 75, 76, 77, 78, 79, 83, 86, 87, 88, 89, 92, 95, 96, 97, 98, 99, 102, 103, 104, 105, 106, 107
Offset: 1

Views

Author

Thomas Oléron Evans, Jun 15 2015

Keywords

Comments

All integers n >= 4 may trivially be expressed using only the digits 0 and 1 in three different bases: 2, n-1 (as '11') and n (as '10'). The numbers in this sequence cannot be expressed using only 0 and 1 in any other base.
The only positive integers that may be expressed using only the digits 0 and 1 in fewer than three different bases are 2 and 3, for which the values {2, n-1, n} are not all distinct or are not all valid bases.
An equivalent definition: For each term a(n) of this sequence, there are at most three integers k >= 2 for which a(n) is a sum of distinct nonnegative integer powers of k.

Examples

			5 is a term of the sequence, because 5 may be expressed using only the digits 0 and 1 in precisely three different bases: 2, 4 and 5 (5 is '12' in base 3).
9 is not a term of the sequence, because 9 can be expressed using only the digits 0 and 1 in four different bases: 2, 3, 8, 9 (9 is '100' in base 3).
		

Crossrefs

Subsequence of A074940.

Programs

  • Maple
    filter:= proc(n)
      local b;
      for b from 3 to n-2 do
        if max(convert(n,base,b)) <= 1 then return false
        fi
      od:
    true
    end proc:
    select(filter, [$2..1000]); # Robert Israel, Jun 19 2015
  • PARI
    is(n)=if(n<2, return(0)); for(b=3,sqrtint(n),if(vecmax(digits(n,b))<2, return(0))); 1 \\ Charles R Greathouse IV, Jun 15 2015
Showing 1-10 of 12 results. Next