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

A217760 Cumulative counting sequence: (adjective-before-noun) pairs with first term 0; see Comments.

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 1, 3, 0, 3, 1, 1, 2, 4, 0, 5, 1, 2, 2, 2, 3, 5, 0, 6, 1, 5, 2, 3, 3, 1, 4, 1, 5, 6, 0, 9, 1, 6, 2, 5, 3, 2, 4, 4, 5, 1, 6, 7, 0, 11, 1, 8, 2, 6, 3, 4, 4, 6, 5, 4, 6, 1, 9, 8, 0, 13, 1, 9
Offset: 1

Views

Author

Clark Kimberling, Mar 24 2013

Keywords

Comments

Write 0 followed by segments defined inductively as follows: each segment
tells how many times each previously written integer occurs, in the order
of first occurrence. This is Method A (adjective-before-noun pairs); for
Method B (noun-before-adjective), see A055168. The sequence A217760 was
originally A055186 (Apr 27 2000); the present A055186 has a shorter
definition and differs from A217760 beginning at the 62nd term.

Examples

			Start with 0, followed by the adjective-noun pair 1,0; followed by
adjective-noun pairs 2,0 then 1,1; etc. Writing the pairs vertically,
the initial segments are
0..1..2 1..3 3 1..4 5 2 2..5 6 5 3 1 1..6 9 6 5 2 4 1..7 11 8 6 4 6 4 1
...0..0 1..0 1 2..0 1 2 3..0 1 2 3 4 5..0 1 2 3 4 5 6..0 1  2 3 4 5 6 9
The order of appearance is 0,1,2,3,4,5,6,9,7,11,8,... conjectured at A055170 to include all the nonnegative integers.
		

Crossrefs

Programs

  • Mathematica
    s = {0}; Do[s = Flatten[{s, {Count[s, #], #} & /@ DeleteDuplicates[s]}], {14}]; s  (* A217760 *)
    s = {0}; Do[s = Flatten[{s, {Count[s, #], #} & /@ (a = DeleteDuplicates[s])}], {24}]; a;  (* A055170 *) (* Peter J. C. Moses, Mar 21 2013 *)

A055187 Cumulative counting sequence: method A (adjective-before-noun)-pairs with first term 1.

Original entry on oeis.org

1, 1, 1, 3, 1, 4, 1, 1, 3, 6, 1, 2, 3, 1, 4, 8, 1, 1, 2, 3, 3, 2, 4, 1, 6, 11, 1, 3, 2, 5, 3, 3, 4, 2, 6, 1, 8, 13, 1, 5, 2, 8, 3, 4, 4, 1, 5, 3, 6, 2, 8, 1, 11, 16, 1, 7, 2, 10, 3, 6, 4, 3, 5, 4, 6, 4, 8, 2, 11, 1, 13, 18, 1, 9, 2, 12, 3, 9, 4, 4, 5, 6, 6, 1, 7, 5, 8, 1, 10, 3, 11, 2, 13, 1, 16, 22, 1
Offset: 1

Views

Author

Clark Kimberling, Apr 27 2000

Keywords

Comments

Conjectures: limit as n goes to infinity of max {a(k) : 1<=k<=n}/sqrt(n) = 2;
-3 < a(n) - 2*sqrt(n) < 3 for all n;
there are infinitely many n such that a(n)=a(n+1). - Benoit Cloitre, Jan 30 2003
After starting with 1, successive segments are generated in adjective-before-noun pairs as in A055186 (i.e., the noun-integers are in increasing order). See A217780 for the sequence originally placed here, in which the noun-integers are in order of 1st occurrence. - Clark Kimberling, Mar 24 2013

Examples

			After writing 1, pairs, written vertically, are as shown:
1..1..3..4 1..6 2 1..8 1 3 2 1..
...1..1..1 3..1 3 4..1 2 3 4 6..
		

Crossrefs

Programs

  • Mathematica
    s = {1}; Do[s = Flatten[{s, {Count[s, #], #} & /@ Union[s]}], {14}]; s  (* A055187 *) (* Peter J. C. Moses, Mar 21 2013 *)

Extensions

Corrected and extended by Benoit Cloitre, Jan 30 2003

A051120 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, 1, 3, 4, 1, 1, 4, 2, 3, 6, 1, 1, 6, 2, 4, 3, 3, 1, 2, 8, 1, 1, 8, 2, 6, 3, 4, 5, 3, 3, 2, 11, 1, 1, 11, 2, 8, 3, 6, 1, 5, 4, 4, 8, 3, 5, 2, 13, 1, 1, 13, 2, 11, 4, 8, 4, 6, 3, 5, 6, 4, 10, 3, 7, 2, 16, 1, 1, 16, 2, 13, 3, 11, 1, 10, 5, 8, 1, 7, 6, 6, 4, 5, 9, 4, 12, 3, 9, 2, 18, 1
Offset: 0

Views

Author

Jamie (sunshinebaby(AT)hotmail.com)

Keywords

Examples

			After 1 1 1 3 1, we see "1 3 and 4 1's", so next terms are 1 3 4 1. Then "1 4, 2 3's, 6 1's"; etc.
		

Crossrefs

Programs

  • Haskell
    import Data.List (sort, nub, group)
    a051120 n = a051120_list !! n
    a051120_list = 1 : f [1] where
      f xs = seen ++ (f $ xs ++ seen) where
        seen = look (reverse $ map length $ group xs') (reverse $ nub xs')
        xs' = sort xs
        look [] []               = []
        look (cnt:cnts) (nr:nrs) = cnt : nr : look cnts nrs
    -- Reinhard Zumkeller, Jun 22 2011
  • Mathematica
    s={1}; Do[s=Flatten[{s,{Count[s,#],#}&/@Reverse[Union[s]]}], {60}]; s (* Peter J. C. Moses, Mar 21 2013 *)

Extensions

More terms from Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999
a(28) corrected by Reinhard Zumkeller, Jun 22 2011

A079603 "Trim" numbers: see reference for definition.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 27, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 125, 127, 131, 137, 139, 147, 149, 151, 157, 163, 167, 173, 179, 181, 189, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263
Offset: 1

Views

Author

N. J. A. Sloane, Sep 22 2008

Keywords

Comments

The old entry with this sequence number was a duplicate of A055186.

Crossrefs

Cf. A070566.
Cf. A145555.

Extensions

Extended by Ray Chandler, Oct 13 2008

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

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane Jan 26 2003

Keywords

Comments

Start with the highest value currently in the sequence and count down to zero.

Examples

			After the sequence is "0, 1, 0, 1, 1, 2, 0", we see one "2", three "1"s, and three "0"s, so we add 1, 2, 3, 1, 3, 0 to the sequence.
		

Crossrefs

Cf. A005150. For other versions see A051120, A079668, A055186.

Programs

  • MATLAB
    a=[0];c=2;d=2; for j=1:7 for k=max(a):-1:0 a(c)=size(find(a(1:d-1)==k),2); a(c+1)=k; c=c+2; end; d=c; end; a' % Nathaniel Johnston, Apr 25 2011
  • Mathematica
    s={0}; Do[s=Flatten[{s, {Count[s,#],#}&/@Range[Max[s],0,-1]}], {60}]; s (* Peter J. C. Moses, Mar 21 2013 *)

Extensions

a(13) - a(75) from Nathaniel Johnston, Apr 25 2011

A055170 n-th distinct number to appear in A055168; also the n-th to appear in A217760.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 7, 11, 8, 13, 17, 10, 19, 21, 15, 12, 23, 26, 20, 14, 16, 28, 22, 32, 24, 35, 27, 18, 38, 30, 25, 41, 34, 29, 44, 31, 48, 50, 46, 36, 52, 39, 42, 56, 37, 60, 54, 47, 33, 63, 58, 40, 43, 68, 53, 45, 72, 65, 76, 55, 61, 51
Offset: 1

Views

Author

Clark Kimberling, Apr 27 2000

Keywords

Comments

Conjecture: this sequence is a permutation of the nonnegative integers.
This is the limiting sequence of the noun-integers in the n-th segment generated as in A217760 (but not A055186); see Example.
The conjecture is true: the number 0 appears in every segment of A055168, and, for n > 0, n appears in the (n+1)-th segment (as the number of occurrences of 0 in the previous segments). - Rémy Sigrist, Oct 16 2017

Examples

			Following the adjective-before-noun definition at A217760, the first segments are
0..1..2 1..3 3 1..4 5 2 2..5 6 5 3 1 1..6 9 6 5 2 4 1..
...0..0 1..0 1 2..0 1 2 3..0 1 2 3 4 5..0 1 2 3 4 5 6..
(continuing:)
7 11 8 6 4 6 4 1....8 13 9 7 7 7 5 2 1 1..1
0..1 2 3 4 5 6 9....0..1 2 3 4 5 6 9 7 11 8,
this last segment counting the "8 0's and 13 1's and 9 2's..." which have previously appeared.  The numbers 8, 13, 9 are used as adjectives and the numbers 0 1 2 3 4 5 6 9 7 11 8 (as in A055170) are used as nouns.
		

Crossrefs

Programs

  • Mathematica
    s = {0}; Do[s = Flatten[{s, {Count[s, #], #} & /@ (DeleteDuplicates[s])}], {30}]; DeleteDuplicates[s] (* Peter J. C. Moses, Mar 25 2013 *)

Extensions

Corrected and edited by Clark Kimberling, Oct 24 2009
Reconciled to A217760 (formerly A055186) by Clark Kimberling, Mar 25 2013

A055169 Number of new numbers in n-th segment of A055168; see example line of A055168.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 2, 3, 1, 4, 2, 2, 3, 3, 3, 2, 1, 3, 3, 2, 4, 4, 3, 2, 4, 3, 4, 3, 2, 4, 2, 5, 3, 3, 5, 3, 6, 3, 4, 3, 5, 3, 6, 7, 3, 4, 4, 3, 3, 6, 5, 5, 4, 3, 5, 6, 4, 4, 7, 6, 4, 8, 4, 6, 5, 5, 4, 4, 6, 5, 5, 5, 2, 8, 4, 8, 7, 5, 9, 5, 5, 5, 5
Offset: 1

Views

Author

Clark Kimberling, Apr 27 2000

Keywords

Comments

Also number of new numbers in n-th segment of A055186.

Programs

  • PARI
    See Links section.

Extensions

Definition corrected by Clark Kimberling, Oct 24 2009
More terms from Rémy Sigrist, Oct 17 2017

A362557 Start with first term 0, then add paired terms counting every preceding term up to the largest term so far and loop back to 0 after every pair has been counted.

Original entry on oeis.org

0, 1, 0, 1, 1, 2, 0, 3, 1, 1, 2, 1, 3, 3, 0, 6, 1, 2, 2, 3, 3, 1, 6, 4, 0, 8, 1, 4, 2, 5, 3, 2, 4, 1, 5, 2, 6, 1, 8, 5, 0, 11, 1, 7, 2, 6, 3, 3, 4, 3, 5, 4, 6, 1, 7, 2, 8, 1, 11, 6, 0, 14, 1, 9, 2, 9, 3, 5, 4, 5, 5, 6, 6, 2, 7, 3, 8, 2, 9, 2, 11, 1, 14, 7, 0
Offset: 1

Views

Author

Robin Powell, Apr 24 2023

Keywords

Comments

Same as A055186, except previous pairs from the same row are included in the count.

Examples

			Write "0". There is now "1 0". Now there is "1 1". We can't find any terms greater than 1, so we recheck the sequence for 0s and find "2 0(s)". Listing these terms in the order read out loud yields the sequence "0, 1, 0, 1, 1, 2, 0, ...".
		

Crossrefs

Programs

  • PARI
    seq(n)={my(L=List([0]), m=0, k=0); while(#Lt==k, L)); if(c, listput(L,c); listput(L,k); m=max(m,c));  k=if(k==m, 0, k+1)); Vec(L)} \\ Andrew Howroyd, May 02 2023
Showing 1-9 of 9 results.