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.

A305976 Filter sequence for a(prime^k) = constant sequences.

This page as a plain text file.
%I A305976 #6 Jul 02 2018 20:25:12
%S A305976 1,2,2,2,2,3,2,2,2,4,2,5,2,6,7,2,2,8,2,9,10,11,2,12,2,13,2,14,2,15,2,
%T A305976 2,16,17,18,19,2,20,21,22,2,23,2,24,25,26,2,27,2,28,29,30,2,31,32,33,
%U A305976 34,35,2,36,2,37,38,2,39,40,2,41,42,43,2,44,2,45,46,47,48,49,2,50,2,51,2,52,53,54,55,56,2,57,58,59,60,61,62,63,2,64,65,66,2
%N A305976 Filter sequence for a(prime^k) = constant sequences.
%H A305976 Antti Karttunen, <a href="/A305976/b305976.txt">Table of n, a(n) for n = 1..100000</a>
%F A305976 a(1) = 1, for n > 1, if A010055(n) = 1 [when n is in A246655], a(n) = 2, otherwise a(n) = 2+A085970(n) = running count from 3 onward.
%o A305976 (PARI)
%o A305976 up_to = 100000;
%o A305976 partialsums(f,up_to) = { my(v = vector(up_to), s=0); for(i=1,up_to,s += f(i); v[i] = s); (v); }
%o A305976 v065515 = partialsums(n -> (omega(n)<=1), up_to);
%o A305976 A065515(n) = v065515[n];
%o A305976 A085970(n) = (n - A065515(n));
%o A305976 A305976(n) = if(1==n,n,if(isprimepower(n),2,2+A085970(n)));
%Y A305976 Cf. A000961 (A246655), A085970, A305800, A305975, A305979.
%K A305976 nonn
%O A305976 1,2
%A A305976 _Antti Karttunen_, Jul 02 2018