login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A326193 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = gcd(n,sigma(n)) * (-1)^[gcd(n,sigma(n))==n]. 3

%I #8 Aug 24 2019 21:28:56

%S 1,2,2,2,2,3,2,2,2,4,2,5,2,4,6,2,2,6,2,4,2,4,2,7,2,4,2,8,2,9,2,2,6,4,

%T 2,2,2,4,2,10,2,9,2,5,6,4,2,5,2,2,6,4,2,9,2,11,2,4,2,7,2,4,2,2,2,9,2,

%U 4,6,4,2,6,2,4,2,5,2,9,2,4,2,4,2,12,2,4,6,5,2,13,14,5,2,4,15,7,2,2,6,2,2,9,2,4,6

%N Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = gcd(n,sigma(n)) * (-1)^[gcd(n,sigma(n))==n].

%C Restricted growth sequence transform of function f, defined as f(n) = -A009194(n) = -n when n is one of multiply-perfect numbers (A007691), otherwise f(n) = A009194(n) = gcd(n,sigma(n)).

%C For all i, j:

%C a(i) = a(j) => A326194(i) = A326194(j).

%H Antti Karttunen, <a href="/A326193/b326193.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 Aux326193(n) = { my(u=gcd(n,sigma(n))); u*((-1)^(u==n)); };

%o v326193 = rgs_transform(vector(up_to, n, Aux326193(n)));

%o A326193(n) = v326193[n];

%Y Cf. A000203, A007691, A009194, A326192, A326194.

%K nonn

%O 1,2

%A _Antti Karttunen_, Aug 24 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 20:48 EDT 2024. Contains 375283 sequences. (Running on oeis4.)