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.

A320018 Restricted growth sequence transform of A320017.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 08 2018

Keywords

Comments

For all i, j: a(i) = a(j) => A318674(i) = A318674(j).

Crossrefs

Cf. A320017,
Cf. also A319682.

Programs

  • PARI
    up_to = 65537;
    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; };
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
    A320017(n) = if(1==n,n,my(m=1); fordiv(n,d,if(1==moebius(d), m *= A019565(d))); (m));
    v320018 = rgs_transform(vector(up_to,n,A320017(n)));
    A320018(n) = v320018[n];