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

A031955 Numbers with exactly two distinct base-10 digits.

Original entry on oeis.org

10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 100, 101, 110, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 131, 133, 141, 144, 151, 155, 161, 166
Offset: 1

Views

Author

Keywords

Comments

The three-digit terms are given by A210666(1,...,244). For numbers with exactly two distinct (but unspecified) digits in other bases, see A031948-A031954. For numbers made of two *given* digits, see A007088 (digits 0 & 1), A007931 (digits 1 & 2), A032810 (digits 2 & 3), A032834 (digits 3 & 4), A256290 (digits 4 & 5), A256291 (digits 5 & 6), A256292 (digits 6 & 7), A256340 (digits 7 & 8), A256341 (digits 8 & 9), and A032804-A032816 (in other bases). - M. F. Hasler, Apr 04 2015
A235154 is a subsequence. - Altug Alkan, Dec 03 2015
A235717 is a subsequence. - Robert Israel, Dec 03 2015

Crossrefs

Programs

  • Haskell
    a031955 n = a031955_list !! (n-1)
    a031955_list = filter ((== 2) . a043537) [0..]
    -- Reinhard Zumkeller, Feb 05 2012
    
  • Maple
    M:= 5: # to get all terms < 10^M
    sort([seq(seq(seq(seq(add(10^(m-j)*`if`(member(j,S2),d2,d1),j=1..m)  ,
      S2 = combinat:-powerset({$2..m}) minus {{}}),
      d2 = {$0..9} minus {d1}), d1 = 1..9), m=2..M)]); # Robert Israel, Dec 03 2015
  • Mathematica
    Select[Range@ 166, Length@ Union@ IntegerDigits@ # == 2 &] (* Michael De Vlieger, Dec 03 2015 *)
  • PARI
    is_A031955(n)=#Set(digits(n))==2 \\ M. F. Hasler, Apr 04 2015
    
  • Python
    def ok(n): return len(set(str(n))) == 2
    print(list(filter(ok, range(167)))) # Michael S. Branicky, Oct 12 2021

Formula

A043537(a(n)) = 2. - Reinhard Zumkeller, Dec 03 2009

Extensions

Name edited by Charles R Greathouse IV, Feb 13 2017

A218556 Numbers with d distinct decimal digits (d=1,...,10) such that for each k=1,...,d, some digit occurs exactly k times.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 101, 110, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 131, 133, 141, 144, 151, 155, 161, 166, 171, 177, 181, 188, 191, 199, 200, 202, 211, 212, 220, 221, 223, 224, 225, 226, 227, 228, 229, 232, 233, 242, 244, 252, 255, 262, 266, 272, 277, 282, 288, 292, 299, 300, 303, 311, 313, 322, 323, 330
Offset: 1

Views

Author

M. F. Hasler, Nov 02 2012

Keywords

Comments

For each of the terms, the number of digits is a triangular number A000217.
The number of terms with d = 1,2,3,... different digits is 10, 243, 38880, ... = A218566(10,d) (+ 1 for d=1, accounting for the initial 0).
The sequence is finite, it has N = 1 + sum_{i=1..10} A218566(10,i) = 9083370609101493843078695864582213215764827510991133 terms. The last term is a(N) = 9999999999888888888777777776666666555555444443333222110 (ten "9"s, nine "8"s, ..., one "0").

Examples

			The terms a(1)=0 through a(10)=9 have exactly 1 digit occurring exactly once.
The terms a(11)=100 through a(253)=998, listed in A210666, have one digit occurring once and a second, different digit occurring exactly twice.
The terms a(254)=100012 through a(39133)=999887 are listed in A182040.
For d=4, we have the (1+2+3+4 =) 10-digit terms a(39134)=1000011223 through 9999888776 with 4 different digits which occur with frequencies 1,2,3 and 4.
		

Crossrefs

Programs

  • PARI
    {my(T(n)=n*(n+1)\2); print1(0); for(i=1,2, s=vector(i+1,j,j-1); for(n=10^(T(i)-1),10^T(i)-1,i !=#Set(digits(n)) & next; c=vector(10); for(j=1,#d=digits(n),c[d[j]+1]++); vecsort(c,,8)==s & print1(","n)))}
    
  • PARI
    is_A218556(n)={ my(c=vector(10)); for(i=1,#n=digits(n),c[n[i]+1]++); #(c=vecsort(c,,8))==1+c[#c] && 2*#n==c[#c]*#c }

A280825 Numbers with an odd number of digits and with an even number of distinct digits.

Original entry on oeis.org

100, 101, 110, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 131, 133, 141, 144, 151, 155, 161, 166, 171, 177, 181, 188, 191, 199, 200, 202, 211, 212, 220, 221, 223, 224, 225, 226, 227, 228, 229, 232, 233, 242, 244, 252, 255, 262, 266, 272, 277, 282, 288, 292, 299, 300, 303, 311, 313, 322, 323, 330, 331, 332, 334, 335
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 08 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[335], Mod[Length[IntegerDigits[#1]], 2] == 1 && Mod[Length[Union[IntegerDigits[#1]]], 2] == 0 & ]

Formula

A000035(A055642(a(n))) = 1.
A000035(A043537(a(n))) = 0.
a(n) = A210666(n) for n < 244.

A218559 Sum_{i=0..n-1} i*(n^(i+1)-1)/(n-1)*n^(i(i+1)/2).

Original entry on oeis.org

0, 6, 714, 1047188, 30515132780, 21936856591278330, 459986443452971306412268, 324518550895166392891543292552264, 8727963565271662417355532872177263437534624, 9999999999888888888777777776666666555555444443333222110
Offset: 1

Views

Author

M. F. Hasler, Nov 02 2012

Keywords

Comments

Largest number which can be written in base n using d+1 times the digit d, d=0,...,n-1. (Or: such that for each k=1,...,n, some digit is used exactly k times.)

Examples

			Written in the respective bases, a(2) = 6 = 110[2], a(3) = 714 = 222110[3], a(4) = 1047188 = 33322110[4], etc.
		

Crossrefs

Programs

  • PARI
    a(b)=sum(i=1,b-1,(b^(i+1)-1)\(b-1)*b^(i*(i+1)\2)*i)

A261453 Near-repdigit palindromes with an odd number of digits and all digits except the middle digit equal.

Original entry on oeis.org

101, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 454, 464, 474, 484, 494, 505, 515, 525, 535, 545, 565, 575, 585, 595, 606, 616, 626, 636, 646, 656, 676
Offset: 1

Views

Author

Felix Fröhlich, Aug 25 2015

Keywords

Crossrefs

Subsequence of A088882.

Programs

  • Maple
    isA261453 := proc(n)
        local ndgs,dgs,d ;
        if isA002113(n) then
            ndgs := A055642(n) ;
            if type(ndgs,'odd') and A043537(n) = 2 then
                dgs := convert(n,base,10) ;
                for d from 2 to nops(dgs)/2 do
                    if op(d,dgs) <> op(d-1,dgs) then
                        return false;
                    end if;
                end do:
                true ;
            else
                false;
            end if;
        else
            false;
        end if;
    end proc:
    n := 1:
    for i from 100 to 2000000 do
        if isA261453(i) then
            printf("%d %d\n",n,i) ;
            n := n+1 ;
        end if;
    end do: # R. J. Mathar, Sep 30 2015
  • Mathematica
    id[n_]:=IntegerDigits[n];len[n_]:=Length[id[n]];
    del[n_]:=Delete[id[n],Ceiling[len[id[n]]/2]];
    u[n_]:=Union[del[id[n]]];
    Select[Range[10^5],StringMatchQ[ToString[#],a__~~b_~~a__]&&Length[u[#]]==1&&u[#]!= Union[id[#]]&] (* Ivan N. Ianakiev, Sep 06 2015 *)
    Select[Flatten[Table[FromDigits[Join[PadRight[{},n,rd],{k},PadRight[{},n,rd]]],{n,3},{rd,9},{k,0,9}]],Count[DigitCount[#],0]==8&] (* Harvey P. Dale, Nov 30 2024 *)
  • PARI
    is_a002113(n) = my(d=digits(n)); d==Vecrev(d)
    is_a210666(n) = my(d=digits(n)); #d>2 && (#setintersect(vecsort(d), vector(#d, x, vecmax(d)))==#d-1 || #setintersect(vecsort(d), vector(#d, x, vecmin(d)))==#d-1)
    is_a001633(n) = #Str(n)%2 \\ after Charles R Greathouse IV in A001633
    is(n) = is_a002113(n) && is_a210666(n) && is_a001633(n) \\ Felix Fröhlich, May 25 2022
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        for d in count(1):
            for out in "123456789":
                for mid in "0123456789":
                    if mid != out:
                        yield int(out*d + mid + out*d)
    print(list(islice(agen(), 52))) # Michael S. Branicky, May 17 2022
    

Formula

a(n) = A002113(A210666(A001633(n))).
Showing 1-5 of 5 results.