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.

A200780 a(n) = number of i in the range 1 <= i <= n such that b(i)=b(n), where b is the sequence A181391 taken with offset 1.

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 2, 3, 2, 1, 5, 1, 6, 4, 2, 2, 1, 7, 3, 1, 8, 2, 5, 1, 9, 2, 2, 3, 3, 1, 10, 4, 4, 4, 1, 11, 5, 5, 6, 6, 1, 12, 5, 1, 13, 6, 1, 14, 7, 8, 3, 1, 15, 7, 2, 1, 16, 3, 1, 17, 9, 2, 1, 18, 4, 1, 19, 10, 2, 11, 7, 1, 20, 6, 2, 12, 7, 13, 8, 2, 1, 21, 3, 1, 22, 14, 3, 3, 1, 23, 8, 1, 24, 15, 4, 5, 4
Offset: 1

Views

Author

N. J. A. Sloane, Nov 22 2011

Keywords

Comments

Equivalently, this is the ORDINAL transform of Van Eck's sequence A181391. - N. J. A. Sloane, Apr 09 2020

Crossrefs

Cf. A181391.

Programs

  • Maple
    # The ORDINAL transform of a sequence a[0], a[1], a[2], ... is the sequence b[0], b[1], b[2], ... where b[n] is the number of times a[n] has occurred in [a[0], ..., a[n]].
    ORDINAL:=proc(a)  local b,t1,tlist,clist,n,t,nt;
    if whattype(a) <> list then RETURN([]); fi:
    t1:=nops(a);
    tlist:=[];
    clist:=Array(1..t1,0);
    b:=[]; nt:=0;
    for n from 1 to t1 do t:=a[n];
    if member(t,tlist,'p') then clist[p] := clist[p]+1; b:=[op(b),clist[p]];
    else nt:=nt+1; tlist:=[op(tlist),t]; clist[nt]:=1; b:=[op(b),1]; fi;
    od: b; end: # N. J. A. Sloane, Apr 09 2020
    See also A200779.