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.

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

This page as a plain text file.
%I A366804 #9 Jan 03 2024 16:34:04
%S A366804 1,2,2,1,2,3,4,3,2,5,6,7,8,1,4,9,2,10,11,12,13,9,14,15,16,3,17,18,8,3,
%T A366804 4,5,2,19,20,21,22,23,24,25,26,7,27,28,29,30,17,31,32,5,33,34,35,36,
%U A366804 37,38,16,5,11,23,8,39,4,40,2,41,42,43,44,45,46,47,48,12,49,50,51,52,53,54,55,56,57,58,59,60,61
%N A366804 Lexicographically  earliest infinite sequence such that a(i) = a(j) => A324182(i) = A324182(j) for all i, j >= 0.
%C A366804 Restricted growth sequence transform of A324182.
%H A366804 Antti Karttunen, <a href="/A366804/b366804.txt">Table of n, a(n) for n = 0..65537</a>
%o A366804 (PARI)
%o A366804 up_to = 65537;
%o A366804 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 A366804 A163511(n) = if(!n,1,my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
%o A366804 A083254(n) = (2*eulerphi(n)-n);
%o A366804 A324182(n) = A083254(A163511(n));
%o A366804 v366804 = rgs_transform(vector(1+up_to,n,A324182(n-1)));
%o A366804 A366804(n) = v366804[1+n];
%Y A366804 Cf. A083254, A163511, A324182.
%K A366804 nonn,look
%O A366804 0,2
%A A366804 _Antti Karttunen_, Oct 24 2023