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.

A328315 Lexicographically earliest infinite sequence such that a(i) = a(j) => A328099(i) = A328099(j) for all i, j.

This page as a plain text file.
%I A328315 #9 Oct 15 2019 13:05:31
%S A328315 1,2,2,3,2,4,2,5,6,7,2,8,2,9,10,11,2,12,2,13,14,15,2,16,14,17,18,11,2,
%T A328315 7,2,12,19,20,5,21,2,12,8,22,2,23,2,24,25,26,2,27,19,28,29,30,2,31,8,
%U A328315 32,33,34,2,35,2,36,37,38,39,40,2,41,42,43,2,44,2,25,45,46,39,47,2,48,49,50,2,51,33,28,11,52,2,53,29,54,55,35,13,56,2,57,58,52
%N A328315 Lexicographically earliest infinite sequence such that a(i) = a(j) => A328099(i) = A328099(j) for all i, j.
%C A328315 Restricted growth sequence transform of A328099, defined as A328099(n) = min(A003415(n), A276086(n)).
%H A328315 Antti Karttunen, <a href="/A328315/b328315.txt">Table of n, a(n) for n = 1..65537</a>
%o A328315 (PARI)
%o A328315 up_to = 65537;
%o A328315 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 A328315 A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
%o A328315 A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; };
%o A328315 A328099(n) = min(A003415(n),A276086(n));
%o A328315 v328315 = rgs_transform(vector(up_to, n, A328099(n)));
%o A328315 A328315(n) = v328315[n];
%Y A328315 Cf. A003415, A276086, A328099, A328113.
%K A328315 nonn
%O A328315 1,2
%A A328315 _Antti Karttunen_, Oct 14 2019