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.

A300230 Restricted growth sequence transform of A286570, combining A009194(n) and A046523(n), i.e., gcd(n,sigma(n)) and the prime signature of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 01 2018

Keywords

Crossrefs

Programs

  • PARI
    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])); }
    A009194(n) = gcd(n, sigma(n));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from A046523
    A286570(n) = (1/2)*(2 + ((A046523(n)+A009194(n))^2) - A046523(n) - 3*A009194(n));
    write_to_bfile(1,rgs_transform(vector(65537,n,A286570(n))),"b300230.txt");