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.

A318887 Filter sequence related to the differences of prime factors of n.

This page as a plain text file.
%I A318887 #5 Sep 24 2018 17:46:04
%S A318887 1,2,2,3,2,4,2,5,3,6,2,7,2,8,9,10,2,11,2,12,13,14,2,15,3,16,5,17,2,18,
%T A318887 2,19,20,21,9,22,2,23,24,25,2,26,2,27,28,29,2,30,3,31,32,33,2,34,35,
%U A318887 36,37,38,2,39,2,40,41,42,20,43,2,44,45,46,2,47,2,48,49,50,13,51,2,52,10,53,2,54,55,56,57,58,2,59,35,60,61,62,32,63,2,64,65,66,2
%N A318887 Filter sequence related to the differences of prime factors of n.
%C A318887 Restricted growth sequence transform of A318885.
%H A318887 Antti Karttunen, <a href="/A318887/b318887.txt">Table of n, a(n) for n = 1..100000</a>
%o A318887 (PARI)
%o A318887 up_to = 100000;
%o A318887 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 A318887 A318885(n) = if(1==n,n,my(f=factor(n),m=2^f[1,2],i=1); for(k=2,#f~,i += (f[k,1]-f[k-1,1]); m *= prime(i)^f[k,2]); (m));
%o A318887 v318887 = rgs_transform(vector(up_to,n,A318885(n)));
%o A318887 A318887(n) = v318887[n];
%Y A318887 Cf. A318885, A318888.
%K A318887 nonn
%O A318887 1,2
%A A318887 _Antti Karttunen_, Sep 24 2018