login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Filter sequence combining A001065(n) and A009195(n), the sum of proper divisors of n and gcd(n,phi(n)).
4

%I #6 Mar 02 2018 14:15:26

%S 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,

%T 21,2,22,23,24,25,26,2,27,28,29,2,30,2,31,32,33,2,34,35,36,37,38,2,39,

%U 40,41,42,43,2,44,2,45,46,47,48,49,2,50,51,52,2,53,2,54,55,56,48,57,2,58,59,60,2,61,62,63,64,65,2,66,37,67,68,69,70,71,2,72,73

%N Filter sequence combining A001065(n) and A009195(n), the sum of proper divisors of n and gcd(n,phi(n)).

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

%H Antti Karttunen, <a href="/A300241/b300241.txt">Table of n, a(n) for n = 1..65537</a>

%e a(65) = a(77) (= 48) because A001065(65) = A001065(77) = 19 and A009195(65) = A009195(77) = 1.

%o (PARI)

%o 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; };

%o write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }

%o A001065(n) = (sigma(n)-n);

%o A009195(n) = gcd(n, eulerphi(n));

%o Aux300241(n) = (1/2)*(2 + ((A001065(n)+A009195(n))^2) - A001065(n) - 3*A009195(n));

%o write_to_bfile(1,rgs_transform(vector(65537,n,Aux300241(n))),"b300241.txt");

%Y Cf. A001065, A009195.

%Y Cf. also A300231, A300240, A300242, A300243.

%K nonn

%O 1,2

%A _Antti Karttunen_, Mar 02 2018