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.

A305297 Restricted growth sequence transform of A292260, formed from 0-digits in ternary representation of A245612(n).

This page as a plain text file.
%I A305297 #6 Jun 01 2018 21:41:40
%S A305297 1,1,1,2,1,1,1,1,1,3,4,1,1,3,4,2,1,5,6,7,8,2,4,8,1,9,1,2,8,10,1,1,1,
%T A305297 11,12,1,5,13,14,15,6,4,1,7,8,16,7,9,1,17,18,19,1,8,8,3,6,17,20,4,1,
%U A305297 17,4,3,1,21,22,23,24,25,4,26,27,1,24,28,29,9,5,4,5,13,10,30,1,31,14,13,6,32,33,6,34,15,18,4,1,35,6,31,36,1,30,36,1,37
%N A305297 Restricted growth sequence transform of A292260, formed from 0-digits in ternary representation of A245612(n).
%C A305297 For all i, j: a(i) = a(j) => A292261(i) = A292261(j).
%H A305297 Antti Karttunen, <a href="/A305297/b305297.txt">Table of n, a(n) for n = 0..65537</a>
%o A305297 (PARI)
%o A305297 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
%o A305297 A048673(n) = (A003961(n)+1)/2;
%o A305297 A254049(n) = A048673((2*n)-1);
%o A305297 A245612(n) = if(n<2,1+n,if(!(n%2),(3*A245612(n/2))-1,A254049(A245612((n-1)/2))));
%o A305297 A291770(n) = { my(s=0, b=1, d); while(n>2, if(!(n%3), s += b); b <<= 1; n \= 3); (s); };
%o A305297 A292260(n) = A291770(A245612(n));
%o A305297 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 A305297 v305297 = rgs_transform(vector(65538,n,A292260(n-1)));
%o A305297 A305297(n) = v305297[1+n];
%Y A305297 Cf. A291770, A292260, A245612, A292261.
%Y A305297 Cf. also A305296, A305298.
%Y A305297 Cf. also A304750.
%K A305297 nonn
%O A305297 0,4
%A A305297 _Antti Karttunen_, May 31 2018