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.

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

This page as a plain text file.
%I A336160 #6 Jul 11 2020 17:58:54
%S A336160 1,1,2,1,3,2,3,1,4,3,5,2,6,3,7,1,8,4,9,3,7,5,10,2,11,6,12,3,13,7,5,1,
%T A336160 14,8,15,4,16,9,17,3,13,7,18,5,19,10,20,2,11,11,15,6,21,12,22,3,22,13,
%U A336160 23,7,24,5,19,1,25,14,26,8,27,15,28,4,29,16,30,9,22,17,31,3,32,13,33,7,34,18,35,5,36,19,25,10,14,20,37,2,38,11,39,11,40,15,41,6,42
%N A336160 Lexicographically earliest infinite sequence such that a(i) = a(j) => A335915(i) = A335915(j) and A336158(i) = A336158(j), for all i, j >= 1.
%C A336160 Restricted growth sequence transform of the ordered pair [A335915(n), A336158(n)].
%C A336160 For all i, j: A324400(i) = A324400(j) => a(i) = a(j) => A336161(i) = A336161(j).
%H A336160 Antti Karttunen, <a href="/A336160/b336160.txt">Table of n, a(n) for n = 1..65537</a>
%o A336160 (PARI)
%o A336160 up_to = 65537;
%o A336160 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 A336160 A000265(n) = (n>>valuation(n,2));
%o A336160 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
%o A336160 A336158(n) = A046523(A000265(n));
%o A336160 A335915(n) = { my(f=factor(n)); prod(k=1,#f~,if(2==f[k,1],1,(A000265(f[k,1]-1)*A000265(f[k,1]+1))^f[k,2])); };
%o A336160 Aux336160(n) = [A335915(n), A336158(n)];
%o A336160 v336160 = rgs_transform(vector(up_to, n, Aux336160(n)));
%o A336160 A336160(n) = v336160[n];
%Y A336160 Cf. A000265, A046523, A324400, A335915, A336158, A336159, A336161, A336162.
%K A336160 nonn
%O A336160 1,3
%A A336160 _Antti Karttunen_, Jul 11 2020