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-2 of 2 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

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
    
Showing 1-2 of 2 results.