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.

A318831 Restricted growth sequence transform of A278222(A000010(n)).

This page as a plain text file.
%I A318831 #8 Sep 05 2018 06:12:25
%S A318831 1,1,1,1,1,1,2,1,2,1,3,1,2,2,1,1,1,2,3,1,2,3,4,1,3,2,3,2,5,1,6,1,3,1,
%T A318831 2,2,3,3,2,1,3,2,7,3,2,4,8,1,7,3,1,2,4,3,3,2,3,5,8,1,6,6,3,1,2,3,3,1,
%U A318831 4,2,4,2,3,3,3,3,6,2,8,1,9,3,7,2,1,7,5,3,4,2,3,4,6,8,3,1,2,7,6,3,4,1,9,2,2
%N A318831 Restricted growth sequence transform of A278222(A000010(n)).
%C A318831 Sequence allots a distinct value for each distinct multiset formed from the lengths of 1-runs in the binary expansion of A000010(n).
%C A318831 For all i, j: a(i) = a(j) => A295660(i) = A295660(j).
%H A318831 Antti Karttunen, <a href="/A318831/b318831.txt">Table of n, a(n) for n = 1..65537</a>
%o A318831 (PARI)
%o A318831 up_to = 65537;
%o A318831 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 A318831 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
%o A318831 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
%o A318831 A278222(n) = A046523(A005940(1+n));
%o A318831 v318831 = rgs_transform(vector(up_to,n,A278222(eulerphi(n))));
%o A318831 A318831(n) = v318831[n];
%Y A318831 Cf. also A000010, A278222, A295660, A318835.
%Y A318831 Compare also with the scatterplots of A286622, A304101 and A318832.
%K A318831 nonn
%O A318831 1,7
%A A318831 _Antti Karttunen_, Sep 04 2018