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.

A325564 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = A325563(n) except f(1) = 0.

This page as a plain text file.
%I A325564 #6 May 11 2019 18:33:23
%S A325564 1,2,2,3,2,4,2,5,4,6,2,7,2,8,6,9,2,10,2,11,8,12,2,13,2,14,10,15,2,16,
%T A325564 2,17,4,18,8,19,2,20,4,21,2,22,2,23,16,24,2,25,8,26,18,27,2,28,2,29,4,
%U A325564 30,2,31,2,32,22,33,6,34,2,35,2,36,2,37,2,38,16,39,2,40,2,41,2,42,2,43,18,44,2,45,2,46,2,47,32,48,20,49,2,50,34,51,2,52,2,53,16
%N A325564 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = A325563(n) except f(1) = 0.
%C A325564 For all i, j:
%C A325564   A305801(i) = A305801(j) => a(i) = a(j) => A325563(i) = A325563(j).
%H A325564 Antti Karttunen, <a href="/A325564/b325564.txt">Table of n, a(n) for n = 1..65537</a>
%o A325564 (PARI)
%o A325564 up_to = 65537;
%o A325564 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 A325564 A325563(n) = if(1==n,n, my(p = Pol(binary(n))*Mod(1, 2)); fordiv(n,d,if((d>1),my(q = Pol(binary(n/d))*Mod(1, 2)); if(0==(p%q), return(n/d)))));
%o A325564 Aux325564(n) = if(1==n,0,A325563(n));
%o A325564 v325564 = rgs_transform(vector(up_to,n,Aux325564(n)));
%o A325564 A325564(n) = v325564[n];
%Y A325564 Cf. A325563.
%K A325564 nonn
%O A325564 1,2
%A A325564 _Antti Karttunen_, May 11 2019