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.

A295877 Restricted growth sequence transform of A173557, Product_{p|n} (p-1).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 29 2017

Keywords

Crossrefs

Programs

  • PARI
    allocatemem(2^30);
    up_to = 65536;
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A173557(n) = my(f=factor(n)[, 1]); prod(k=1, #f, f[k]-1); \\ This function from Michel Marcus, Oct 31 2017
    write_to_bfile(1,rgs_transform(vector(up_to,n,A173557(n))),"b295877.txt");

Formula

a(2n) = a(n).