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.

A324347 Lexicographically earliest positive sequence such that a(i) = a(j) => A069010(i) = A069010(j) and A324055(i) = A324055(j), for all i, j >= 0.

This page as a plain text file.
%I A324347 #6 Feb 24 2019 17:52:45
%S A324347 1,2,3,2,4,5,6,2,7,8,9,10,11,12,13,2,14,15,16,17,18,19,20,21,22,23,24,
%T A324347 25,26,21,22,2,27,28,29,5,30,19,18,31,32,33,34,35,36,37,38,39,40,41,
%U A324347 42,43,44,45,46,47,48,49,50,51,52,53,54,2,55,16,18,15,56,19,57,58,59,60,61,62,63,64,32,65,66,67,68,62,69,70,71,72,73,74,75,76,77,78,79,80,81
%N A324347 Lexicographically earliest positive sequence such that a(i) = a(j) => A069010(i) = A069010(j) and A324055(i) = A324055(j), for all i, j >= 0.
%C A324347 Restricted growth sequence transform of the ordered pair [A069010(n), A324055(n)].
%H A324347 Antti Karttunen, <a href="/A324347/b324347.txt">Table of n, a(n) for n = 0..65537</a>
%H A324347 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A324347 For all n >= 1, a((2^n)-1) = 2.
%o A324347 (PARI)
%o A324347 up_to = 65537;
%o A324347 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 A324347 A069010(n) = ((1 + (hammingweight(bitxor(n, n>>1)))) >> 1); \\ From A069010
%o A324347 A324055(n) = { my(m1=2,m2=1,p=2,mp=p*p); while(n, if(!(n%2), p=nextprime(1+p); mp = p*p, m1 *= p; if(3==(n%4),mp *= p,m2 *= (mp-1)/(p-1))); n>>=1); (m1-m2); };
%o A324347 Aux324347(n) = [A069010(n), A324055(n)];
%o A324347 v324347 = rgs_transform(vector(1+up_to,n,Aux324347(n-1)));
%o A324347 A324347(n) = v324347[1+n];
%Y A324347 Cf. A069010, A324055, A324346.
%K A324347 nonn
%O A324347 0,2
%A A324347 _Antti Karttunen_, Feb 24 2019