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.

A304112 Restricted growth sequence transform of A246277(A064413(n)), related to indices in the prime factorization of EKG sequence.

This page as a plain text file.
%I A304112 #7 May 17 2018 17:02:54
%S A304112 1,2,3,4,2,3,5,6,7,2,4,8,9,2,7,10,11,12,13,2,9,6,14,3,4,15,16,2,13,17,
%T A304112 18,19,2,16,20,21,2,19,5,22,23,24,2,21,25,26,27,28,29,3,12,30,7,9,31,
%U A304112 32,2,24,33,34,2,32,35,36,37,38,2,34,8,39,40,41,42,2,38,11,43,4,44,45,2,42,46,13,16,47,48,49,2,45,50,51,7
%N A304112 Restricted growth sequence transform of A246277(A064413(n)), related to indices in the prime factorization of EKG sequence.
%C A304112 For all i, j: a(i) = a(j) => A304113(i) = A304113(j).
%H A304112 Antti Karttunen, <a href="/A304112/b304112.txt">Table of n, a(n) for n = 1..65539</a>
%H A304112 <a href="/index/Ed#EKG">Index entries for sequences related to EKG sequence</a>
%o A304112 (PARI)
%o A304112 \\ Needs also code for A064413:
%o A304112 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 A304112 A246277(n) = { if(1==n, 0, while((n%2), n = A064989(n)); (n/2)); };
%o A304112 Aux304112(n) = A246277(A064413(n));
%o A304112 write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
%o A304112 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 A304112 write_to_bfile(1,rgs_transform(vector(65539,n,Aux304112(n))),"b304112.txt");
%Y A304112 Cf. A064413, A246277, A278263, A304113.
%Y A304112 Cf. also A304114.
%K A304112 nonn
%O A304112 1,2
%A A304112 _Antti Karttunen_, May 17 2018