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.

A323374 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = A323373(n) for all other numbers, except f(p) = -(p mod 2) for primes p.

This page as a plain text file.
%I A323374 #7 Jan 13 2019 19:29:49
%S A323374 1,2,3,4,3,4,3,5,6,5,3,5,3,7,8,9,3,7,3,9,10,11,3,9,12,13,14,15,3,9,3,
%T A323374 16,12,16,17,13,3,18,17,16,3,13,3,19,20,21,3,16,22,19,23,24,3,18,25,
%U A323374 26,27,28,3,16,3,29,30,31,32,33,3,31,34,24,3,26,3,35,25,36,37,26,3,31,38,39,3,26,40,41,42,39,3,26,43,44,37,45,46,31,3,41,47,39,3,31,3,48
%N A323374 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = A323373(n) for all other numbers, except f(p) = -(p mod 2) for primes p.
%C A323374 For all i, j:
%C A323374   A305801(i) = A305801(j) => a(i) = a(j),
%C A323374   a(i) = a(j) => A039651(i) = A039651(j).
%H A323374 Antti Karttunen, <a href="/A323374/b323374.txt">Table of n, a(n) for n = 1..65537</a>
%o A323374 (PARI)
%o A323374 up_to = 65537;
%o A323374 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 A323374 A049559(n) = gcd(eulerphi(n), n-1);
%o A323374 A160595(n) = if(1==n, n, numerator(eulerphi(n)/(n-1)));
%o A323374 Aux323374(n) = if(isprime(n),-(n%2),[A049559(n), A160595(n)]);
%o A323374 v323374 = rgs_transform(vector(up_to, n, Aux323374(n)));
%o A323374 A323374(n) = v323374[n];
%Y A323374 Cf. A039651, A049559, A160595, A323373.
%Y A323374 Cf. also A322587, A322592, A323405.
%K A323374 nonn
%O A323374 1,2
%A A323374 _Antti Karttunen_, Jan 13 2019