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.

A336391 Lexicographically earliest infinite sequence such that a(i) = a(j) => A331410(i) = A331410(j) and A336158(i) = A336158(j), for all i, j >= 1.

This page as a plain text file.
%I A336391 #6 Aug 10 2020 09:29:30
%S A336391 1,1,2,1,3,2,2,1,4,3,3,2,3,2,5,1,6,4,6,3,7,3,3,2,8,3,9,2,10,5,2,1,5,6,
%T A336391 5,4,10,6,5,3,6,7,6,3,11,3,3,2,4,8,12,3,10,9,12,2,12,10,10,5,3,2,13,1,
%U A336391 12,5,10,6,5,5,6,4,14,10,15,6,5,5,6,3,16,6,6,7,17,6,17,3,14,11,5,3,7,3,17,2,6,4,11,8,14,12,6,3,18
%N A336391 Lexicographically earliest infinite sequence such that a(i) = a(j) => A331410(i) = A331410(j) and A336158(i) = A336158(j), for all i, j >= 1.
%C A336391 Restricted growth sequence transform of the ordered pair [A331410(n), A336158(n)].
%C A336391 For all i, j:
%C A336391   A336390(i) = A336390(j) => a(i) = a(j)
%C A336391   a(i) = a(j) => A336921(i) = A336921(j),
%C A336391   a(i) = a(j) => A336922(i) = A336922(j) => A336923(i) = A336923(j).
%H A336391 Antti Karttunen, <a href="/A336391/b336391.txt">Table of n, a(n) for n = 1..65537</a>
%o A336391 (PARI)
%o A336391 up_to = 65537;
%o A336391 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 A336391 A000265(n) = (n>>valuation(n,2));
%o A336391 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
%o A336391 A336158(n) = A046523(A000265(n));
%o A336391 A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
%o A336391 Aux336391(n) = [A331410(n), A336158(n)];
%o A336391 v336391 = rgs_transform(vector(up_to, n, Aux336391(n)));
%o A336391 A336391(n) = v336391[n];
%Y A336391 Cf. A331410, A336467, A336390, A336921, A336922, A336923.
%Y A336391 Cf. also A336471.
%K A336391 nonn
%O A336391 1,3
%A A336391 _Antti Karttunen_, Aug 10 2020