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.

A303777 Ordinal transform of A081373; ordinal transform of {the ordinal transform of A000010}.

Original entry on oeis.org

1, 1, 2, 2, 3, 1, 4, 3, 4, 2, 5, 1, 6, 3, 7, 5, 8, 2, 9, 4, 6, 7, 10, 3, 11, 5, 8, 4, 12, 1, 13, 9, 10, 6, 14, 2, 15, 7, 11, 5, 16, 1, 17, 8, 9, 12, 18, 3, 13, 6, 19, 7, 20, 8, 14, 4, 15, 16, 21, 2, 22, 17, 10, 18, 23, 5, 24, 11, 25, 3, 26, 1, 27, 9, 12, 6, 19, 1, 28, 10, 29, 11, 30, 1, 31, 13, 32, 7, 33, 1, 20, 21, 14, 22, 15, 8
Offset: 1

Views

Author

Antti Karttunen, Apr 30 2018

Keywords

Crossrefs

Cf. A000010, A081373, A081375 (positions of ones), A210719 (positions of records), A286610.

Programs

  • Maple
    b:= proc() 0 end: g:= proc() 0 end:
    h:= proc(n) option remember; local t;
          t:= numtheory[phi](n); b(t):= b(t)+1
        end:
    a:= proc(n) option remember; local t;
          t:= h(n); g(t):= g(t)+1
        end:
    seq(a(n), n=1..120);  # Alois P. Heinz, Apr 30 2018
  • Mathematica
    b[] = 0; g[] = 0;
    h[n_] := h[n] = With[{t = EulerPhi[n]}, b[t] = b[t]+1];
    a[n_] := a[n] = With[{t = h[n]}, g[t] = g[t]+1];
    Array[a, 120] (* Jean-François Alcover, Dec 19 2021, after Alois P. Heinz *)
  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    v081373 = ordinal_transform(vector(up_to,n,eulerphi(n)));
    A081373(n) = v081373[n];
    v303777 = ordinal_transform(vector(up_to,n,A081373(n)));
    A303777(n) = v303777[n];