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.

A323907 Lexicographically earliest positive sequence such that a(i) = a(j) => A004718(i) = A004718(j), for all i, j >= 0.

This page as a plain text file.
%I A323907 #12 Feb 10 2019 23:07:01
%S A323907 1,2,3,4,2,1,5,6,3,4,1,2,4,3,7,8,2,1,5,6,1,2,3,4,5,6,2,1,6,5,9,10,3,4,
%T A323907 1,2,4,3,7,8,1,2,3,4,2,1,5,6,4,3,7,8,3,4,1,2,7,8,4,3,8,7,11,12,2,1,5,
%U A323907 6,1,2,3,4,5,6,2,1,6,5,9,10,1,2,3,4,2,1,5,6,3,4,1,2,4,3,7,8,5,6,2,1,6,5,9,10,2,1
%N A323907 Lexicographically earliest positive sequence such that a(i) = a(j) => A004718(i) = A004718(j), for all i, j >= 0.
%C A323907 Restricted growth sequence transform of A004718, Per Nørgård's "infinity sequence".
%C A323907 The composer Per Nørgård's name is also written in the OEIS as Per Noergaard.
%H A323907 Antti Karttunen, <a href="/A323907/b323907.txt">Table of n, a(n) for n = 0..65535</a>
%o A323907 (PARI)
%o A323907 up_to = 65535;
%o A323907 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 A323907 A004718list(up_to) = { my(v=vector(up_to)); v[1]=1; v[2]=-1; for(n=3, up_to, v[n] = if(n%2, 1+v[n>>1], -v[n/2])); (v); }; \\ After code in A004718.
%o A323907 v004718 = A004718list(up_to);
%o A323907 A004718(n) = if(!n,n,v004718[n]);
%o A323907 v323907 = rgs_transform(vector(1+up_to,n,A004718(n-1)));
%o A323907 A323907(n) = v323907[1+n];
%Y A323907 Restricted growth sequence transform of A004718, A323908 and A323909.
%Y A323907 Cf. A083866 (positions of ones).
%K A323907 nonn
%O A323907 0,2
%A A323907 _Antti Karttunen_, Feb 09 2019