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.

A323888 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = [A032742(n),A302042(n)] for all n > 1, with f(1) = 0.

This page as a plain text file.
%I A323888 #6 Feb 08 2019 21:43:01
%S A323888 1,2,2,3,2,4,2,5,4,6,2,7,2,8,6,9,2,10,2,11,12,13,2,14,6,15,16,17,2,18,
%T A323888 2,19,20,21,8,22,2,23,24,25,2,26,2,27,28,29,2,30,8,31,32,33,2,34,35,
%U A323888 36,37,38,2,39,2,40,41,42,24,43,2,44,45,46,2,47,2,48,49,50,13,51,2,52,53,54,2,55,56,57,58,59,2,60,61,62,63,64,65,66,2,67,68,69,2,70,2
%N A323888 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = [A032742(n),A302042(n)] for all n > 1, with f(1) = 0.
%C A323888 For all i, j:
%C A323888   A305800(i) = A305800(j) => a(i) = a(j),
%C A323888   a(i) = a(j) => A001222(i) = A001222(j),
%C A323888   a(i) = a(j) => A253557(i) = A253557(j).
%H A323888 Antti Karttunen, <a href="/A323888/b323888.txt">Table of n, a(n) for n = 1..65537</a>
%o A323888 (PARI)
%o A323888 up_to = 65537;
%o A323888 ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
%o A323888 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 A323888 A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639
%o A323888 A032742(n) = (n/A020639(n));
%o A323888 v078898 = ordinal_transform(vector(up_to,n,A020639(n)));
%o A323888 A078898(n) = v078898[n];
%o A323888 A302042(n) = if((1==n)||isprime(n),1,my(c = A078898(n), p = prime(-1+primepi(A020639(n))+primepi(A020639(c))), d = A078898(c), k=0); while(d, k++; if((1==k)||(A020639(k)>=p),d -= 1)); (k*p));
%o A323888 A323888aux(n) = if(1==n, 0, [A032742(n),A302042(n)]);
%o A323888 v323888 = rgs_transform(vector(up_to, n, A323888aux(n)));
%o A323888 A323888(n) = v323888[n];
%Y A323888 Cf. A032742, A302042.
%Y A323888 Cf. also A001222, A253557, A300247, A305800.
%K A323888 nonn
%O A323888 1,2
%A A323888 _Antti Karttunen_, Feb 08 2019