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.

Previous Showing 31-35 of 35 results.

A079668 Start with 1; at n-th step, write down what is in the sequence so far.

Original entry on oeis.org

1, 1, 1, 3, 1, 4, 1, 0, 2, 1, 3, 1, 0, 6, 1, 1, 2, 2, 3, 1, 4, 2, 0, 10, 1, 3, 2, 3, 3, 2, 4, 0, 5, 1, 6, 4, 0, 12, 1, 6, 2, 6, 3, 3, 4, 1, 5, 2, 6, 0, 7, 0, 8, 0, 9, 1, 10, 8, 0, 15, 1, 8, 2, 8, 3, 5, 4, 2, 5, 5, 6, 1, 7, 1, 8, 1, 9, 2, 10, 0, 11, 1, 12, 10
Offset: 1

Views

Author

N. J. A. Sloane Jan 26 2003

Keywords

Comments

After 1 1 1 3 1, we see "4 1's, 0 2's and 1 3", so next terms are 4 1 0 2 3 1.

Examples

			Row n lists all terms written at the n-th step:
  1;
  1, 1;
  3, 1;
  4, 1,  0, 2, 1, 3;
  1, 0,  6, 1, 1, 2, 2, 3, 1, 4;
  2, 0, 10, 1, 3, 2, 3, 3, 2, 4, 0, 5, 1, 6;
  4, 0, 12, 1, 6, 2, 6, 3, 3, 4, 1, 5, 2, 6, 0, 7, 0, 8, 0, 9, 1, 10;
  ...
		

Crossrefs

For other versions see A051120, A055186, A079686.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<1, 0, b(n-1)+add(x^i, i=T(n))) end:
    T:= proc(n) option remember; `if`(n=1, 1, (p->
          seq([coeff(p, x, i), i][], i=ldegree(p)..degree(p)))(b(n-1)))
        end:
    seq(T(n), n=1..10);  # Alois P. Heinz, Aug 24 2025
  • Mathematica
    s={1}; Do[s=Flatten[{s,{Count[s,#],#}&/@Range[Min[s],Max[s]]}],{20}];s (* Peter J. C. Moses, Mar 21 2013 *)
  • Python
    from itertools import islice
    def agen(): # generator of terms
        a = [1]
        yield 1
        while True:
            counts = []
            for d in range(min(a), max(a)+1):
                c = a.count(d)
                counts.extend([c, d])
            a += counts
            yield from counts
    print(list(islice(agen(), 84))) # Michael S. Branicky, Aug 24 2025

Extensions

More terms from Sean A. Irvine, Aug 24 2025

A358066 Inventory sequence: record where the 1's, 2's, etc. are located starting with a(1) = 1, a(2) = 1 (see example).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 4, 1, 2, 3, 5, 4, 6, 7, 1, 2, 3, 5, 9, 4, 6, 10, 7, 11, 8, 13, 1, 2, 3, 5, 9, 16, 4, 6, 10, 17, 7, 11, 18, 8, 13, 21, 12, 19, 1, 2, 3, 5, 9, 16, 28, 4, 6, 10, 17, 29, 7, 11, 18, 30, 8, 13, 21, 34, 12, 19, 31, 14, 22, 35, 1, 2, 3, 5, 9, 16, 28, 46, 4, 6, 10, 17, 29, 47, 7, 11, 18, 30, 48
Offset: 1

Views

Author

Ctibor O. Zizka, Oct 29 2022

Keywords

Examples

			At stage n >= 1 we only look at the numbers 1 up to n, and ignore numbers bigger than n.
Stage 0: start with a(1) = 1, a(2) = 1.
Stage 1: we see 1's at 1,2, so we adjoin 1,2, getting 1,1, 1,2.
Stage 2: we see 1's at 1,2,3, and 2's at 4, so we adjoin 1,2,3,4, getting 1,1,1,2, 1,2,3,4.
Stage 3: we see 1's at 1,2,3,5, 2's at 4,6 and 3's at 7, so we adjoin 1,2,3,5,4,6,7, getting 1,1,1,2,1,2,3,4, 1,2,3,5,4,6,7.
Stage 4: we see 1's at 1,2,3,5,9, 2's at 4,6,10, 3's at 7,11, 4's at 8,13, so we adjoin 1,2, ..., 8,13 and so on.
We obtain an irregular triangle by writing the results of the stages as separate rows:
1, 1,
1, 2,
1, 2, 3, 4,
1, 2, 3, 5, 4, 6, 7,
1, 2, 3, 5, 9, 4, 6, 10, 7, 11, 8, 13,
1, 2, 3, 5, 9, 16, 4, 6, 10, 17, 7, 11, 18, 8, 13, 21, 12, 19,
1, 2, 3, 5, 9, 16, 28, 4, 6, 10, 17, 29, 7, 11, 18, 30, 8, 13, 21, 34, 12, 19, 31, 14, 22, 35,
... (_N. J. A. Sloane_, Nov 07 2022)
		

Crossrefs

See A357443 for another version.

Programs

  • Python
    terms = [1, 1]
    for i in range(1,11):
        new_terms = []
        for j in range(1, i+1):
            for k in range(len(terms)):
                if terms[k] == j: new_terms.append(k+1)
        terms.extend(new_terms)
    print(terms) # Gleb Ivanov, Nov 01 2022

A030718 The second list after the following procedure: starting with a list [1] and an empty list, repeatedly add the distinct values already in the first list in ascending order to the second list and add the corresponding frequencies of those values to the first list.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 18, 20
Offset: 1

Views

Author

Keywords

Examples

			Second list begins:
  1;
  1;
  1, 2;
  1, 2;
  1, 2, 3;
  1, 2, 3;
  1, 2, 3, 4;
  1, 2, 3, 4, 5;
  1, 2, 3, 4, 5, 6;
  1, 2, 3, 4, 5, 6, 7;
  1, 2, 3, 4, 5, 6, 7;
  1, 2, 3, 4, 5, 6, 7, 8;
  1, 2, 3, 4, 5, 6, 7, 8, 9, 11;
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15;
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 18;
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 18, 20;
		

Crossrefs

Cf. A030717 (1st list).

Programs

  • Mathematica
    s = t = {{1}}; Do[AppendTo[t, BinCounts[#, {1, Max[#] + 1}] &[Flatten[t]]]; AppendTo[s, Union@ Flatten@ t], {12}]; Flatten[s] (* Michael De Vlieger, Nov 15 2022, after Peter J. C. Moses at A030717 *)

Extensions

Name revised in line with A030778 by Peter Munn, Oct 11 2022

A365882 Irregular table read by rows; the first row contains a single 1; for all n > 1, row n+1 is the frequency of each term in rows 1..n.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 6, 6, 6, 6, 6, 6, 2, 2, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 2, 2, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 10, 10, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 2, 2, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 16, 16
Offset: 1

Views

Author

Neal Gersh Tolunsky, Sep 22 2023

Keywords

Examples

			Triangle begins:
      k=1  2  3  4  5  6  7  8 ...
  n=1:  1;
  n=2:  1;
  n=3:  2, 2;
  n=4:  2, 2, 2, 2;
  n=5:  2, 2, 6, 6, 6, 6, 6, 6;
  n=6:  2, 2, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6;
  ...
		

Crossrefs

Cf. A327616 (ordinal transform version), A011782 (row lengths), A030717.

A139124 Starting from 1, at any step count the appearances of k, where k ranges from the highest number to 1.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 1, 3, 3, 3, 3, 4, 1, 5, 3, 4, 1, 2, 6, 3, 5, 1, 2, 2, 7, 4, 6, 1, 2, 2, 3, 7, 6, 7, 3, 3, 2, 3, 8, 8, 8, 3, 3, 3, 2, 3, 11, 9, 8, 1, 0, 1, 4, 3, 3, 2, 3, 15, 10, 8, 1, 0, 0, 0, 1, 1, 1, 5, 3, 3, 2, 4, 18, 11, 10, 1, 0, 0, 1, 0, 0, 0, 2, 2, 1, 5, 3, 3, 3, 5, 20, 12, 14
Offset: 0

Views

Author

Keywords

Examples

			Start from 1. There is just one 1. So the sequence becames 1,1. Then count two 1s.
So we have 1,1,2. Then one 2 and two 1 -> 1,1,2,1,2. Then two 2 and three 1 -> 1,1,2,1,2,2,3. Then one 3, three 2, three 1 -> 1,1,2,1,2,2,3,1,3,3. Then three 3, three 2 and four 1 -> 1,1,2,1,2,2,3,1,3,3,3,3,4. And so on.
		

Crossrefs

Programs

  • Mathematica
    s={1};Do[si={};Do[j=Max[s]-i+1;AppendTo[si,Count[s,j]],{i,Max[s]}];s=AppendTo[s,si]//Flatten,{n,15}];s (* James C. McMahon, Jun 29 2025 *)

Extensions

a(87)-a(89) inserted by James C. McMahon, Jun 29 2025
Previous Showing 31-35 of 35 results.