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.

A324197 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A324195(n) for all other numbers except f(2) = -1 and f(n) = -2 when n is an odd prime.

This page as a plain text file.
%I A324197 #6 Feb 20 2019 21:43:53
%S A324197 1,2,3,4,3,4,3,5,6,7,3,5,3,8,6,9,3,5,3,9,10,11,3,9,12,13,14,15,3,5,3,
%T A324197 16,17,18,12,9,3,19,20,16,3,21,3,22,14,23,3,16,24,25,26,27,3,9,28,29,
%U A324197 30,31,3,9,3,32,33,29,34,35,3,36,37,25,3,16,3,38,14,39,24,40,3,29,33,41,3,16,42,43,44,45,3,9,46,47,48,49,50,29,3,51,52,16,3,53,3,54,14
%N A324197 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A324195(n) for all other numbers except f(2) = -1 and f(n) = -2 when n is an odd prime.
%C A324197 For all i, j: a(i) = a(j) => A324190(i) = A324190(j).
%H A324197 Antti Karttunen, <a href="/A324197/b324197.txt">Table of n, a(n) for n = 1..65537</a>
%o A324197 (PARI)
%o A324197 up_to = 65537;
%o A324197 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 A324197 A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
%o A324197 A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
%o A324197 A297112(n) = if(1==n, 0, 2^A297167(n));
%o A324197 A324195(n) = { my(v=0); fordiv(n, d, v = bitor(v,A297112(d))); (v); };
%o A324197 Aux324197(n) = if(isprime(n),-(n%2)-1,A324195(n));
%o A324197 v324197 = rgs_transform(vector(up_to, n, Aux324197(n)));
%o A324197 A324197(n) = v324197[n];
%Y A324197 Cf. A297112, A297167, A297168, A061395, A324190, A324195, A324196.
%K A324197 nonn
%O A324197 1,2
%A A324197 _Antti Karttunen_, Feb 20 2019