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.

A322311 Lexicographically earliest such sequence a that a(i) = a(j) => A322310(i) = A322310(j) for all i, j.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 03 2018

Keywords

Comments

Restricted growth sequence transform of A322310.
For all i, j: a(i) = a(j) => A014197(i) = A014197(j).

Crossrefs

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; };
    A320000sq(n, k) = if(1==n, if(1==k,2,1), sumdiv(n, d, if(d>=k && isprime(d+1), my(p=d+1, q=n/d); sum(i=0, valuation(n, p), A320000sq(q/(p^i), p))))); \\ Cf. A320000
    A322310(n) = if(1==n,3,my(m=1); fordiv(n,d, my(s, p=d+1, q=n/d); if(isprime(p) && (s = sum(i=0,valuation(n, p), A320000sq(q/(p^i),p))), m *= prime(s))); (m));
    v322311 = rgs_transform(vector(up_to, n, A322310(n)));
    A322311(n) = v322311[n];