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.

A300231 Filter sequence combining A001065(n) and A009194(n), the sum of proper divisors of n and gcd(n,sigma(n)).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 10, 11, 2, 12, 2, 13, 14, 15, 2, 16, 17, 18, 19, 20, 2, 21, 2, 22, 23, 24, 19, 25, 2, 13, 26, 27, 2, 28, 2, 29, 30, 31, 2, 32, 33, 34, 12, 35, 2, 36, 26, 37, 38, 39, 2, 40, 2, 41, 42, 43, 44, 45, 2, 46, 47, 48, 2, 49, 2, 50, 51, 52, 44, 53, 2, 54, 55, 56, 2, 57, 38, 35, 30, 58, 2, 59, 60, 32, 61, 62, 63, 64
Offset: 1

Views

Author

Antti Karttunen, Mar 01 2018

Keywords

Comments

Restricted growth sequence transform of P(A001065(n), A009194(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.

Examples

			a(27) = a(35) (= 19) because A001065(27) = A001065(35) = 13 and A009194(27) = A009194(35) = 1.
		

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])); }
    A001065(n) = (sigma(n)-n);
    A009194(n) = gcd(n, sigma(n));
    Aux300231(n) = (1/2)*(2 + ((A001065(n)+A009194(n))^2) - A001065(n) - 3*A009194(n));
    write_to_bfile(1,rgs_transform(vector(65537,n,Aux300231(n))),"b300231.txt");