login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A305980 Filter sequence for a(Squarefree numbers > 1) = constant sequences. 5

%I #6 Jul 02 2018 20:25:25

%S 1,2,2,3,2,2,2,4,5,2,2,6,2,2,2,7,2,8,2,9,2,2,2,10,11,2,12,13,2,2,2,14,

%T 2,2,2,15,2,2,2,16,2,2,2,17,18,2,2,19,20,21,2,22,2,23,2,24,2,2,2,25,2,

%U 2,26,27,2,2,2,28,2,2,2,29,2,2,30,31,2,2,2,32,33,2,2,34,2,2,2,35,2,36,2,37,2,2,2,38,2,39,40,41,2,2,2,42,2,2,2,43,2,2,2

%N Filter sequence for a(Squarefree numbers > 1) = constant sequences.

%C For all i, j: A305800(i) = A305800(j) => a(i) = a(j).

%H Antti Karttunen, <a href="/A305980/b305980.txt">Table of n, a(n) for n = 1..100000</a>

%F a(1) = 1; for n > 1, if A008966(n) = 1 [when n is in A005117], then a(n) = 2, otherwise a(n) = 2+A057627(n).

%o (PARI)

%o up_to = 100000;

%o partialsums(f,up_to) = { my(v = vector(up_to), s=0); for(i=1,up_to,s += f(i); v[i] = s); (v); }

%o v057627 = partialsums(x -> !issquarefree(x),up_to);

%o A057627(n) = v057627[n];

%o A305980(n) = if(1==n,n,if(issquarefree(n),2,2+A057627(n)));

%Y Cf. A005117, A008966, A057627, A305800.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jul 02 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)