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.

A305301 Restricted growth sequence transform of A278222(A304760(n)), constructed from runlengths of 1-digits in base-3 representation of A254103(n).

This page as a plain text file.
%I A305301 #9 Jul 21 2025 00:02:15
%S A305301 1,2,1,2,2,3,1,1,3,2,2,2,2,4,2,5,4,3,1,2,5,1,1,3,3,3,3,2,5,2,2,5,6,2,
%T A305301 2,5,2,6,3,1,7,7,2,5,2,7,2,2,4,7,2,2,7,3,1,2,7,3,1,3,5,2,2,2,8,3,1,5,
%U A305301 5,2,2,5,3,4,4,2,7,4,2,7,9,5,5,2,5,2,2,7,3,5,5,5,5,1,1,5,6,5,5,5,5,1,1,5,10,2
%N A305301 Restricted growth sequence transform of A278222(A304760(n)), constructed from runlengths of 1-digits in base-3 representation of A254103(n).
%C A305301 For all i, j: A304740(i) = A304740(j) => a(i) = a(j).
%H A305301 Antti Karttunen, <a href="/A305301/b305301.txt">Table of n, a(n) for n = 0..65537</a>
%o A305301 (PARI)
%o A305301 A254103(n) = if(!n,n,if(!(n%2),(3*A254103(n/2))-1,(3*(1+A254103((n-1)/2)))\2));
%o A305301 A289813(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==1, 1, 0)), 2); } \\ From A289813
%o A305301 A304760(n) = A289813(A254103(n));
%o A305301 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
%o A305301 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
%o A305301 A278222(n) = A046523(A005940(1+n));
%o A305301 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 A305301 v305301 = rgs_transform(vector(65538,n,A278222(A304760(n-1))));
%o A305301 A305301(n) = v305301[1+n];
%Y A305301 Cf. A254103, A289813, A304740, A304760.
%Y A305301 Cf. also A305302, A305303.
%K A305301 nonn,base
%O A305301 0,2
%A A305301 _Antti Karttunen_, May 30 2018