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
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, -3, 13, -1, 14, -1, -5, 15, 16, 17, 18, -1, 19, 20, 21, -1, 22, -1, 23, 24, 25, -1, 26, -2, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
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.
PROG
(PARI)
up_to = 65537;
partialsums(f, up_to) = { my(v = vector(up_to), s=0); for(i=1, up_to, s += f(i); v[i] = s); (v); }
v065515 = partialsums(n -> (omega(n)<=1), up_to);
A065515(n) = v065515[n];
A085970(n) = (n - A065515(n));
A305974(n) = if(1==n, n, my(e = isprimepower(n)); if(e, -e, 1+A085970(n)));
CROSSREFS
Cf. A000961, A065515, A085970, A095874, A305975 (rgs-transform).
Sequence in context: A353371 A353334 A353304 * A332267 A161148 A143773
KEYWORD
sign
AUTHOR
Antti Karttunen, Jul 02 2018
STATUS
approved

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 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)