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.

A305902 Restricted growth sequence transform of A305900(A048673(n)).

This page as a plain text file.
%I A305902 #10 Jun 15 2018 09:26:45
%S A305902 1,2,3,4,5,6,7,8,4,4,4,4,9,4,10,4,11,12,13,14,15,16,17,18,19,20,21,22,
%T A305902 23,4,4,24,25,4,26,4,27,28,4,29,30,4,31,4,32,33,34,35,4,36,37,38,39,
%U A305902 40,41,4,42,4,4,43,44,45,46,47,48,49,50,51,4,52,4,53,54,55,56,57,58,59,60,61,4,62,63,64,4,4,65,66,67,4,68,4,69,70,71,72,73,74,4
%N A305902 Restricted growth sequence transform of A305900(A048673(n)).
%C A305902 For all i, j:
%C A305902   a(i) = a(j) => A278224(i) = A278224(j).
%C A305902   a(i) = a(j) => A286583(i) = A286583(j).
%C A305902   a(i) = a(j) => A292251(i) = A292251(j).
%H A305902 Antti Karttunen, <a href="/A305902/b305902.txt">Table of n, a(n) for n = 1..65537</a>
%o A305902 (PARI)
%o A305902 up_to = 65537;
%o A305902 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 A305902 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
%o A305902 A048673(n) = (A003961(n)+1)/2;
%o A305902 A305900(n) = if(n<=5,n,if(isprime(n),5,3+n-primepi(n)));
%o A305902 v305902 = rgs_transform(vector(up_to,n,A305900(A048673(n))));
%o A305902 A305902(n) = v305902[n];
%Y A305902 Cf. A048673, A305900.
%Y A305902 Cf. also A305901.
%K A305902 nonn
%O A305902 1,2
%A A305902 _Antti Karttunen_, Jun 14 2018