login
Filter sequence combining the 2-adic valuation of n (A007814) with gcd(n,sigma(n)) (A009194).
4

%I #6 Sep 24 2018 17:46:26

%S 1,2,1,3,1,4,1,5,1,6,1,7,1,6,8,9,1,10,1,11,1,6,1,12,1,6,1,13,1,4,1,14,

%T 8,6,1,3,1,6,1,15,1,4,1,7,8,6,1,16,1,2,8,11,1,4,1,17,1,6,1,18,1,6,1,

%U 19,1,4,1,11,8,6,1,20,1,6,1,7,1,4,1,21,1,6,1,13,1,6,8,22,1,23,24,7,1,6,25,26,1,2,8,3,1,4,1,27,8

%N Filter sequence combining the 2-adic valuation of n (A007814) with gcd(n,sigma(n)) (A009194).

%C Restricted growth sequence transform of ordered pair [A007814(n), A009194(n)].

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

%o (PARI)

%o up_to = 65537;

%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 A007814(n) = valuation(n,2);

%o A009194(n) = gcd(n, sigma(n));

%o v319338 = rgs_transform(vector(up_to,n,[A007814(n),A009194(n)]));

%o A319338(n) = v319338[n];

%Y Cf. A007814, A009194, A305801, A319346.

%K nonn

%O 1,2

%A _Antti Karttunen_, Sep 24 2018