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.

A305296 Restricted growth sequence transform of A305295(n), formed from 1-digits in ternary representation of A245612(n).

This page as a plain text file.
%I A305296 #10 Jul 21 2025 00:02:11
%S A305296 1,2,3,3,4,5,2,6,7,8,9,1,3,2,8,2,10,11,2,12,13,14,2,1,4,15,16,7,17,18,
%T A305296 8,1,19,20,21,22,3,23,16,2,24,25,26,27,3,28,2,29,7,30,28,30,31,32,33,
%U A305296 2,34,31,20,18,17,16,2,8,35,36,37,38,39,8,40,41,4,42,43,44,31,45,16,46,47,48,49,50,51,4,52,53,4,1,54,15,3
%N A305296 Restricted growth sequence transform of A305295(n), formed from 1-digits in ternary representation of A245612(n).
%C A305296 For all i, j: a(i) = a(j) => A305431(i) = A305431(j).
%H A305296 Antti Karttunen, <a href="/A305296/b305296.txt">Table of n, a(n) for n = 0..65537</a>
%o A305296 (PARI)
%o A305296 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
%o A305296 A048673(n) = (A003961(n)+1)/2;
%o A305296 A254049(n) = A048673((2*n)-1);
%o A305296 A245612(n) = if(n<2,1+n,if(!(n%2),(3*A245612(n/2))-1,A254049(A245612((n-1)/2))));
%o A305296 A289813(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==1, 1, 0)), 2); } \\ From A289813
%o A305296 A305295(n) = A289813(A245612(n));
%o A305296 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 A305296 v305296 = rgs_transform(vector(65538,n,A305295(n-1)));
%o A305296 A305296(n) = v305296[1+n];
%Y A305296 Cf. A245612, A289813, A305295, A305431.
%Y A305296 Cf. also A305297, A305298.
%Y A305296 Cf. also A304758, A304740.
%K A305296 nonn
%O A305296 0,2
%A A305296 _Antti Karttunen_, May 31 2018