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.

A305975 Filter sequence: All prime powers p^k, k >= 1, are allotted to distinct equivalence classes according to their exponent k, while all other numbers occur in singular equivalence classes of their own.

This page as a plain text file.
%I A305975 #9 Jul 02 2018 20:25:05
%S A305975 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 A305975 2,19,20,21,22,23,2,24,25,26,2,27,2,28,29,30,2,31,3,32,33,34,2,35,36,
%U A305975 37,38,39,2,40,2,41,42,43,44,45,2,46,47,48,2,49,2,50,51,52,53,54,2,55,10,56,2,57,58,59,60,61,2,62,63,64,65,66,67,68,2,69,70,71
%N A305975 Filter sequence: All prime powers p^k, k >= 1, are allotted to distinct equivalence classes according to their exponent k, while all other numbers occur in singular equivalence classes of their own.
%C A305975 Restricted growth sequence transform of A305974.
%C A305975 For all i, j: A305800(i) = A305800(j) => a(i) = a(j) => A305976(i) = A305976(j).
%H A305975 Antti Karttunen, <a href="/A305975/b305975.txt">Table of n, a(n) for n = 1..100000</a>
%F A305975 a(prime) = 2, a(prime^2) = 3, a(prime^3) = 5, a(prime^4) = 10, a(prime^5) = 19.
%o A305975 (PARI)
%o A305975 up_to = 100000;
%o A305975 partialsums(f,up_to) = { my(v = vector(up_to), s=0); for(i=1,up_to,s += f(i); v[i] = s); (v); }
%o A305975 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 A305975 v065515 = partialsums(n -> (omega(n)<=1), up_to);
%o A305975 A065515(n) = v065515[n];
%o A305975 A085970(n) = (n - A065515(n));
%o A305975 A305974(n) = if(1==n,n,my(e = isprimepower(n)); if(e,-e,1+A085970(n)));
%o A305975 v305975 = rgs_transform(vector(up_to,n,A305974(n)));
%o A305975 A305975(n) = v305975[n];
%Y A305975 Cf. A000961 (A246655), A085970, A305800, A305974, A305976, A305979.
%K A305975 nonn
%O A305975 1,2
%A A305975 _Antti Karttunen_, Jul 02 2018