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.

A323898 Lexicographically earliest sequence such that a(i) = a(j) => A000120(i) = A000120(j) and A083254(i) = A083254(j), for all i, j >= 1.

This page as a plain text file.
%I A323898 #5 Feb 10 2019 23:06:11
%S A323898 1,2,3,2,4,5,6,2,4,5,7,8,9,10,11,2,12,13,14,8,15,10,16,17,18,10,19,20,
%T A323898 21,22,23,2,24,5,25,26,27,10,19,17,28,29,30,20,31,32,33,34,27,35,36,
%U A323898 20,37,38,39,40,41,32,42,43,44,45,46,2,47,48,49,8,50,51,52,53,54,10,55,20,56,57,58,34,59,10,60,61,56,32,39,40,62,63,64,65,66,45,67,68,69,70,16
%N A323898 Lexicographically earliest sequence such that a(i) = a(j) => A000120(i) = A000120(j) and A083254(i) = A083254(j), for all i, j >= 1.
%C A323898 Restricted growth sequence transform of the ordered pair [A000120(n), A083254(n)].
%H A323898 Antti Karttunen, <a href="/A323898/b323898.txt">Table of n, a(n) for n = 1..65537</a>
%H A323898 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A323898 a(2^n) = 2 for all n >= 1.
%o A323898 (PARI)
%o A323898 up_to = 65537;
%o A323898 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 A323898 A083254(n) = (2*eulerphi(n)-n);
%o A323898 A323898aux(n) = [hammingweight(n), A083254(n)];
%o A323898 v323898 = rgs_transform(vector(up_to,n,A323898aux(n)));
%o A323898 A323898(n) = v323898[n];
%Y A323898 Cf. A000120, A083254.
%Y A323898 Cf. also A318310, A323892, A323898.
%K A323898 nonn
%O A323898 1,2
%A A323898 _Antti Karttunen_, Feb 09 2019