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.

A342022 Lexicographically earliest infinite sequence such that a(i) = a(j) => A342002(i) = A342002(j) for all i, j >= 0.

This page as a plain text file.
%I A342022 #10 Mar 13 2021 18:08:49
%S A342022 1,2,2,3,4,5,2,5,6,7,8,9,4,10,11,12,13,14,15,11,16,17,18,19,20,8,21,
%T A342022 22,23,24,2,10,25,9,21,26,27,24,28,29,30,31,18,32,33,34,35,36,37,38,
%U A342022 39,40,41,42,43,44,45,46,47,48,4,11,8,14,49,50,21,51,52,53,54,55,56,57,58,59,60,61,7,62,63,64,65,66
%N A342022 Lexicographically earliest infinite sequence such that a(i) = a(j) => A342002(i) = A342002(j) for all i, j >= 0.
%C A342022 Restricted growth sequence transform of A342002.
%C A342022 For all i, j >= 1:
%C A342022   a(i) = a(j) => A342017(i) = A342017(j) => A342019(i) = A342019(j).
%H A342022 Antti Karttunen, <a href="/A342022/b342022.txt">Table of n, a(n) for n = 0..65537</a>
%H A342022 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%o A342022 (PARI)
%o A342022 up_to = 65537;
%o A342022 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 A342022 A342002(n) = { my(s=0, m=1, p=2, e); while(n, e = (n%p); m *= p^(e>0); s += (e/p); n = n\p; p = nextprime(1+p)); (s*m); };
%o A342022 v342022 = rgs_transform(vector(1+up_to,n,A342002(n-1)));
%o A342022 A342022(n) = v342022[1+n];
%Y A342022 Cf. A003415, A276086, A327860, A328572, A342002, A342017, A342019.
%Y A342022 Cf. also A286626, A328388.
%K A342022 nonn,look
%O A342022 0,2
%A A342022 _Antti Karttunen_, Mar 12 2021