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.

A304731 Restricted growth sequence transform of A246277(A304531(n)).

This page as a plain text file.
%I A304731 #7 May 19 2018 12:39:24
%S A304731 1,2,3,2,4,5,6,5,7,8,2,9,10,3,11,12,13,4,14,15,16,17,18,19,15,20,21,
%T A304731 16,22,23,24,5,25,26,7,27,28,29,6,30,31,2,32,33,9,34,35,36,12,37,38,3,
%U A304731 39,40,10,41,42,43,11,44,45,46,47,48,49,18,50,51,17,52,53,54,4,55,56,8,57,58,59,13,60,61,62,63,64,65,66,67,68,69,61,70,71,14,72
%N A304731 Restricted growth sequence transform of A246277(A304531(n)).
%C A304731 For all i, j: a(i) = a(j) => A304732(i) = A304732(j).
%H A304731 Antti Karttunen, <a href="/A304731/b304731.txt">Table of n, a(n) for n = 1..74431</a>
%o A304731 (PARI)
%o A304731 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 A304731 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 A304731 A246277(n) = { if(1==n, 0, while((n%2), n = A064989(n)); (n/2)); };
%o A304731 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 A304731 v304731 = rgs_transform(vector(76503,n,A246277(A304531(n)))); \\ Needs also code from A304531
%o A304731 A304731(n) = v304731[n];
%Y A304731 Cf. A246277, A304531.
%Y A304731 Differs from related A304728 for the first time at n=66, where a(66) = 18, while A304728(66) = 50.
%Y A304731 Cf. also A304535, A304732.
%K A304731 nonn
%O A304731 1,2
%A A304731 _Antti Karttunen_, May 19 2018