login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #7 Jun 01 2018 21:41:33

%S 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 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 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 Restricted growth sequence transform of A305295(n), formed from 1-digits in ternary representation of A245612(n).

%C For all i, j: a(i) = a(j) => A305431(i) = A305431(j).

%H Antti Karttunen, <a href="/A305296/b305296.txt">Table of n, a(n) for n = 0..65537</a>

%o (PARI)

%o A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961

%o A048673(n) = (A003961(n)+1)/2;

%o A254049(n) = A048673((2*n)-1);

%o A245612(n) = if(n<2,1+n,if(!(n%2),(3*A245612(n/2))-1,A254049(A245612((n-1)/2))));

%o A289813(n) = { my (d=digits(n, 3)); from digits(vector(#d, i, if (d[i]==1, 1, 0)), 2); } \\ From A289813

%o A305295(n) = A289813(A245612(n));

%o 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 v305296 = rgs_transform(vector(65538,n,A305295(n-1)));

%o A305296(n) = v305296[1+n];

%Y Cf. A245612, A289813, A305295, A305431.

%Y Cf. also A305297, A305298.

%Y Cf. also A304758, A304740.

%K nonn

%O 0,2

%A _Antti Karttunen_, May 31 2018