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.

A182040 Integers whose decimal representation consists of three distinct digits, one appearing once, one appearing twice, and one appearing three times.

Original entry on oeis.org

100012, 100013, 100014, 100015, 100016, 100017, 100018, 100019, 100021, 100022, 100031, 100033, 100041, 100044, 100051, 100055, 100061, 100066, 100071, 100077, 100081, 100088, 100091, 100099, 100102, 100103, 100104, 100105, 100106, 100107, 100108, 100109, 100112
Offset: 1

Views

Author

Jonathan Vos Post, Apr 09 2012

Keywords

Comments

There are 38880 terms, including 41 squares (A182098) and 3640 primes (A182092). - Zak Seidov, Apr 12 2012
This is the subsequence of A218556 consisting of terms with indices n = 254, ..., 39133. The number of terms is 38880 = A218566(10,3), the starting index is 254 = 1 + A218566(10,1) + A218566(10,2) + 1. - M. F. Hasler, Nov 02 2012

Crossrefs

Cf. A071925, A181986 (digitally balanced numbers: ternary numbers which have the same number of 0's as 1's as 2's), A182051 (primes with a majority of one digit).

Programs

  • Mathematica
    t = Select[Range[100000, 999999], Sort[Transpose[Tally[IntegerDigits[#]]][[2]]] == {1, 2, 3} &]; Take[t, 32] (* T. D. Noe, Apr 11 2012 *)
  • PARI
    is(n)=n=vecsort(eval(Vec(Str(n))));vecsort(apply(k->sum(i=1, #n,n[i]==k),vecsort(n,,8)))==[1,2,3] \\ Charles R Greathouse IV, Apr 11 2012

A210666 Numbers with at least three digits in which all digits but one are the same.

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
Offset: 1

Views

Author

Arkadiusz Wesolowski, May 08 2012

Keywords

Comments

Each k-digit term has k-1 appearances of a digit, d1, and 1 appearance of a different digit, d2, and k-1 >= 2 so that d1 is repeated. Specifically, the 2-digit terms of A010784 are not terms here. - Michael S. Branicky, May 22 2022
a(n) = A031955(n+81) for n <= 244.
For n <= 243, i.e., the 3-digit terms, a(n) = A218556(n+10). - M. F. Hasler, Nov 02 2012

Crossrefs

Subsequence of A031955. Supersequence of A164937.

Programs

  • Mathematica
    lst = {}; Do[If[SortBy[Tally[IntegerDigits[n]], Last][[-1, -1]] == IntegerLength[n] - 1, AppendTo[lst, n]], {n, 100, 288}]; lst
    lst = {}; Do[r = Table[a, {n}]; Do[c = FromDigits@Permutations[Join[{d}, r]]; If[d == 0, c = Rest[c]]; AppendTo[lst, c], {d, 0, 9}], {a, 0, 9}, {n, 2, 2}]; Drop[Union@Flatten[lst], 19]
    nrepQ[n_] := Module[{dg = Select[DigitCount[n], # > 0 &]}, Length[dg] == 2 && Min[dg] == 1 && Max[dg] > 1]; Select[Range[300], nrepQ] (* Harvey P. Dale, Nov 20 2012 *)
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        for d in count(3):
            dterms = set()
            for most in "123456789":
                dterms.add(int(most + "0"*(d-1)))
                for diff in "0123456789":
                    if most == diff: continue
                    cands = (most*i + diff + most*(d-1-i) for i in range(d))
                    dterms.update(int(t) for t in cands if t[0] != "0")
            yield from sorted(dterms)
    print(list(islice(agen(), 52))) # Michael S. Branicky, May 17 2022

A218566 Triangle T[r,c]=(r-1)*binomial(r-1,c-1)*(c-1)!*A093883(c), read by rows.

Original entry on oeis.org

0, 1, 3, 2, 12, 240, 3, 27, 1080, 226800, 4, 48, 2880, 1209600, 3657830400, 5, 75, 6000, 3780000, 22861440000, 1267438233600000, 6, 108, 10800, 9072000, 82301184000, 9125555281920000, 11274806061917798400000
Offset: 1

Views

Author

M. F. Hasler, Nov 02 2012

Keywords

Comments

T[b,d] gives the number of positive numbers that can be written in base b with d(d+1)/2 digits such that for each k=1,...,d some digit appears exactly k times, cf. A218560, A167819, A218556 and related sequences.

Examples

			The first 6 rows of the triangle are:
r=1: 0;
r=2: 1, 3;
r=3: 2, 12,  240;
r=4: 3, 27,  1080,  226800;
r=5: 4, 48,  2880,  1209600,  3657830400;
r=6: 5, 75,  6000,  3780000,  22861440000,  1267438233600000.
Row 2 counts the numbers 1 and 4=100[2], 5=101[2], 6=110[2].
Row 3 counts the numbers {1, 2} and {9=100[3], 10=101[3], 12=110[3], 14=112[3], 16=121[3], ..., 25=221[3]} and {248=100012[3], ..., 714=222110[3]}.
		

Programs

  • PARI
    T(r,c)=(r-1)*binomial(r-1,c-1)*(c-1)!*A093883(c)

Formula

T[r,1] = r-1. T[r,2] = 3(r-1)^2. T[r,3] = 60(r-2)(r-1)^2, etc.

A218560 Numbers with d distinct ternary digits (d=1,2,3) such that for each k=1,...,d, some digit occurs exactly k times.

Original entry on oeis.org

0, 1, 2, 9, 10, 12, 14, 16, 17, 18, 20, 22, 23, 24, 25, 248, 250, 251, 254, 257, 258, 259, 262, 263, 264, 265, 267, 269, 272, 275, 276, 277, 281, 285, 287, 288, 289, 291, 293, 295, 296, 298, 299, 300, 301, 303, 305, 306, 307, 309, 311, 313, 314, 315, 317, 319, 320, 321, 322, 326, 329, 330, 331, 335
Offset: 1

Views

Author

M. F. Hasler, Nov 02 2012

Keywords

Comments

For each of the terms, the number of ternary (= base 3) digits is a triangular number A000217.
The base 2 analog would have only the 5 terms 0,1,4,5,6. See A218556 for the base 10 analog.
The sequence A167819 is a subsequence containing exactly all terms >= 9.
The sequence is finite, with 255=3+12+240 (= 1 + sum of the 3rd row of A218566) terms.

Examples

			The terms a(1)=0 through a(3)=2 have exactly 1 digit occurring exactly once.
The terms a(4)=9=100[3] through a(15)=25=221[3], have one ternary digit occurring once and a second, different digit occurring exactly twice.
The terms a(16)=248=100012[3] through a(255)=714=222110[3] contain each ternary digit at least once. There are no other terms in this sequence.
		

Crossrefs

Programs

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

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