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.

A063850 Say what you see in previous term, reporting total number for each digit encountered.

Original entry on oeis.org

1, 11, 21, 1211, 3112, 132112, 311322, 232122, 421311, 14123113, 41141223, 24312213, 32142321, 23322114, 32232114, 23322114, 32232114, 23322114, 32232114, 23322114, 32232114, 23322114, 32232114, 23322114, 32232114
Offset: 0

Views

Author

N. J. A. Sloane, Aug 25 2001

Keywords

Comments

The digits of each term a(n) are a permutation of those of the corresponding term A005151(n). - Chayim Lowen, Jul 16 2015

Examples

			To get the term after 311322, we say: two 3's, two 1's, two 2's, so 232122.
		

Crossrefs

A variant of A005150, A005151, etc.

Programs

  • Mathematica
    deldup[ lst_ ] := Module[ {i, s}, s={}; For[ i=1, i<=Length[ lst ], i++, If[ !MemberQ[ s, lst[ [ i ] ] ], AppendTo[ s, lst[ [ i ] ] ] ] ]; s ]; next[ term_ ] := FromDigits[ Flatten[ ({Count[ IntegerDigits[ term ], # ], #}&)/@deldup[ IntegerDigits[ term ] ] ] ]
  • Python
    from collections import Counter; s = '1'
    for _ in range(25):
        print(s, end = ', '); d = Counter(s); s = ''
        for k, v in d.items(): s += str(v) + k  # Ya-Ping Lu, Jun 06 2025

Formula

After a while sequence has period 2.

Extensions

Corrected and extended by Dean Hickerson, Aug 27 2001