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.

A322317 Ordinal transform of A322316.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 04 2018

Keywords

Crossrefs

Programs

  • 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; };
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A007814(n) = valuation(n,2);
    A007949(n) = valuation(n,3);
    A122841(n) = min(A007814(n), A007949(n));
    A244417(n) = max(valuation(n,2), valuation(n,3));
    v322316 = rgs_transform(vector(up_to, n, [A122841(n), A244417(n)]));
    v322317 = ordinal_transform(v322316);
    A322317(n) = v322317[n];