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.

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].

This page as a plain text file.
%I A326193 #8 Aug 24 2019 21:28:56
%S A326193 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 A326193 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 A326193 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 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].
%C A326193 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 A326193 For all i, j:
%C A326193   a(i) = a(j) => A326194(i) = A326194(j).
%H A326193 Antti Karttunen, <a href="/A326193/b326193.txt">Table of n, a(n) for n = 1..65537</a>
%o A326193 (PARI)
%o A326193 up_to = 65537;
%o A326193 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 A326193 Aux326193(n) = { my(u=gcd(n,sigma(n))); u*((-1)^(u==n)); };
%o A326193 v326193 = rgs_transform(vector(up_to, n, Aux326193(n)));
%o A326193 A326193(n) = v326193[n];
%Y A326193 Cf. A000203, A007691, A009194, A326192, A326194.
%K A326193 nonn
%O A326193 1,2
%A A326193 _Antti Karttunen_, Aug 24 2019