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.

A111066 Numbers with digits 1 and 2 and at least one of each.

Original entry on oeis.org

12, 21, 112, 121, 122, 211, 212, 221, 1112, 1121, 1122, 1211, 1212, 1221, 1222, 2111, 2112, 2121, 2122, 2211, 2212, 2221, 11112, 11121, 11122, 11211, 11212, 11221, 11222, 12111, 12112, 12121, 12122, 12211, 12212, 12221, 12222, 21111, 21112, 21121, 21122, 21211
Offset: 1

Views

Author

Alexandre Wajnberg & Youri Mora, Oct 08 2005

Keywords

Crossrefs

Equals A007931 minus A000042 and A002276. Supersequence of A214218.

Programs

  • Mathematica
    FromDigits /@ Select[ IntegerDigits[ Range[210], 3], Union[ # ] == {1, 2} &] (* Robert G. Wilson v, Oct 09 2005 *)
    Union[FromDigits/@Select[Flatten[Table[Tuples[{1,2},n],{n,2,5}],1], Union[#] == {1,2}&]] (* Harvey P. Dale, Sep 05 2013 *)
  • Python
    from itertools import count, islice
    def agen():
        for i in count(1):
            s = bin(i+1)[3:].replace('1', '2').replace('0', '1')
            if 0 < s.count('1') < len(s):
                yield int(s)
    print(list(islice(agen(), 42))) # Michael S. Branicky, Dec 21 2021

Extensions

More terms from Robert G. Wilson v, Oct 09 2005
Crossrefs from Charles R Greathouse IV, Aug 03 2010

A276349 Numbers consisting of a nonempty string of 1's followed by a nonempty string of 0's.

Original entry on oeis.org

10, 100, 110, 1000, 1100, 1110, 10000, 11000, 11100, 11110, 100000, 110000, 111000, 111100, 111110, 1000000, 1100000, 1110000, 1111000, 1111100, 1111110, 10000000, 11000000, 11100000, 11110000, 11111000, 11111100, 11111110, 100000000, 110000000, 111000000
Offset: 1

Views

Author

Jaroslav Krizek, Aug 30 2016

Keywords

Comments

Intersection of A037415 and A009996 except for 1 [Corrected by David A. Corneth, Aug 30 2016].
Set of terms from sequence A052983.
a(n) is the binary expansion of A043569(n). - Michel Marcus, Sep 04 2016

Examples

			60 is of the form binomial(a, 2) + b where 0 < b <= a and a = 11, b = 5. So a(60) has (11 + 1) digits and 5 leading ones. The other digits are 0. Giving a(60) = 111110000000. It has 7 (more than 1) trailing zeros so the next one, a(61) is a(60) + 10^(7 - 1). - _David A. Corneth_, Aug 30 2016
		

Crossrefs

Programs

  • Magma
    [n: n in [1..10^7] | Seqint(Setseq(Set(Sort(Intseq(n))))) eq 10 and Seqint(Sort((Intseq(n)))) eq n];
    
  • Maple
    seq(seq(10^(m+1)*(1-10^(-j))/9,j=1..m),m=1..20); # Robert Israel, Sep 02 2016
  • Mathematica
    Table[FromDigits@ Join[ConstantArray[1, #1], ConstantArray[0, #2]] & @@@ Transpose@ {#, n - #} &@ Range[n - 1], {n, 2, 9}] // Flatten (* Michael De Vlieger, Aug 30 2016 *)
    Flatten[Table[FromDigits[Join[PadRight[{},n,1],PadRight[{},k,0]]],{n,8},{k,8}]]//Sort (* Harvey P. Dale, Jan 09 2019 *)
  • PARI
    is(n) = vecmin(digits(n))==0 && vecmax(digits(n))==1 && digits(n)==vecsort(digits(n), , 4) \\ Felix Fröhlich, Aug 30 2016
    
  • PARI
    a(n) = my(r =  ceil((sqrt(1+8*n)+1)/2), k = n - binomial(r-1, 2));10^(r-k)*(10^(k)-1)/9
    \\ given an element n, computes the next element of the sequence.
    nxt(n) = my(d = digits(n), qd=#d, s = vecsum(d)); if(qd-s>1, n+10^(qd-s-1), 10^qd)
    \\ given an element n of the sequence, computes its place in the sequence.
    inv(n) = my(d = digits(n)); binomial(#d-1,2) + vecsum(d) \\ David A. Corneth, Aug 31 2016
    
  • Python
    from math import isqrt, comb
    def A276349(n): return 10*(10**(m:=isqrt(n<<3)+1>>1)-10**(comb(m+1,2)-n))//9 # Chai Wah Wu, Jun 16 2025

Formula

A227362(a(n)) = 10.
From Robert Israel, Sep 02 2016: (Start)
a((m^2-m)/2+j) = 10^(m+1)*(1-10^(-j))/9 for m>=1, 1<=j<=m.
a(n) = 10*(10^m - 10^(-n+m*(m+1)/2))/9 where m = A002024(n). (End)
A002275(A002260(n)) * 10^A004736(n) - Peter Kagey, Sep 02 2016
Sum_{n>=1} 1/a(n) = A073668. - Amiram Eldar, Feb 20 2022
a(n) = 10*A309761(n). - Chai Wah Wu, Jun 16 2025

A308493 Numbers k such that k in base 10 contains the same digits as k in some other base.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 20, 21, 23, 31, 41, 42, 43, 46, 51, 53, 61, 62, 63, 71, 73, 81, 82, 83, 84, 86, 91, 93, 100, 101, 102, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 131, 133, 141, 144, 151, 155, 158, 161, 166, 171, 177, 181
Offset: 1

Views

Author

Jinyuan Wang, Aug 05 2019

Keywords

Comments

Supersequence of A034294 and A307498.
This sequence is infinite because 2*10^k is a term for any k >= 0.
Also 10^k is a term when k >= 0 and so too 10^k*(10^m - 1)/9 for any k > 0 and m >= 0. - Bruno Berselli, Aug 26 2019

Examples

			k = 113 is in the sequence because the set of digits of k {1, 3} equals the set of digits of (k in base 110) = 13.
		

Crossrefs

Programs

  • PARI
    isok(k) = {my(j=Set(digits(k))); for(b=2, k+1, if((b!=10) && (Set(digits(k, b)) == j), return(1))); return(0);} \\ Michel Marcus, Aug 05 2019
Showing 1-3 of 3 results.