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!)
A305974 a(1) = 1; for n > 1, if n = p^k for some prime p and exponent k >= 1, then a(n) = -k, otherwise a(n) = 1+A085970(n). 2

%I #7 Jul 02 2018 20:24:54

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

%T -3,13,-1,14,-1,-5,15,16,17,18,-1,19,20,21,-1,22,-1,23,24,25,-1,26,-2,

%U 27,28,29,-1,30,31,32,33,34,-1,35,-1,36,37,-6,38,39,-1,40,41,42,-1,43,-1,44,45,46,47,48,-1,49,-4,50,-1,51,52

%N a(1) = 1; for n > 1, if n = p^k for some prime p and exponent k >= 1, then a(n) = -k, otherwise a(n) = 1+A085970(n).

%H Antti Karttunen, <a href="/A305974/b305974.txt">Table of n, a(n) for n = 1..16384</a>

%F a(1) = 1; for n > 1, if n = p^k for some prime p and exponent k >= 1, then a(n) = -k, otherwise [when n is not a prime power], a(n) = 1+A085970(n) = running count from 2 onward.

%o (PARI)

%o up_to = 65537;

%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 v065515 = partialsums(n -> (omega(n)<=1), up_to);

%o A065515(n) = v065515[n];

%o A085970(n) = (n - A065515(n));

%o A305974(n) = if(1==n,n,my(e = isprimepower(n)); if(e,-e,1+A085970(n)));

%Y Cf. A000961, A065515, A085970, A095874, A305975 (rgs-transform).

%K sign

%O 1,4

%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 July 17 12:34 EDT 2024. Contains 374377 sequences. (Running on oeis4.)