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.

A297162 Restricted growth sequence transform of A297172, which is Möbius transform of A253564.

This page as a plain text file.
%I A297162 #7 Dec 28 2017 19:34:56
%S A297162 1,2,3,2,4,2,5,6,3,3,7,3,8,4,3,9,10,6,11,4,12,5,13,14,4,7,14,5,15,3,
%T A297162 16,17,18,8,4,9,19,10,20,21,22,4,23,7,12,11,24,25,5,9,26,8,27,9,18,28,
%U A297162 29,13,30,31,32,15,18,33,34,5,35,10,36,31,37,17,38,16,14,11,5,7,39,40,25,19,41,42,43,22,44,45,46,14,20,13,47,23
%N A297162 Restricted growth sequence transform of A297172, which is Möbius transform of A253564.
%H A297162 Antti Karttunen, <a href="/A297162/b297162.txt">Table of n, a(n) for n = 1..8192</a>
%o A297162 (PARI)
%o A297162 up_to = 8192;
%o A297162 rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
%o A297162 write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
%o A297162 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
%o A297162 A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));
%o A297162 A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
%o A297162 A253564(n) = A156552(A122111(n));
%o A297162 A297172(n) = sumdiv(n,d,moebius(n/d)*A253564(d));
%o A297162 write_to_bfile(1,rgs_transform(vector(up_to,n,A297172(n))),"b297162.txt");
%Y A297162 Cf. A253564, A297172.
%Y A297162 Cf. also A297113, A297157, A297161.
%K A297162 nonn
%O A297162 1,2
%A A297162 _Antti Karttunen_, Dec 27 2017