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!)
A346456 a(n) is the smallest number k such that Sum_{j=1..k} (-1)^omega(j) = -n, where omega(j) is the number of distinct primes dividing j. 2
3, 4, 5, 8, 9, 32, 9283, 9284, 9285, 9292, 9293, 9294, 9295, 9296, 9343, 9434, 9437, 9440, 9479, 9686, 9689, 9690, 9697, 9698, 9699, 9700, 9711, 9716, 9717, 9718, 9719, 9720, 9721, 9740, 9741, 9852, 9855, 9856, 9857, 10284, 10285, 10286, 10305, 10314, 10325, 10326, 10331, 10338 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = min {k : Sum_{j=1..k} mu(rad(j)) = -n}, where mu is the Moebius function and rad is the squarefree kernel.
MATHEMATICA
a[n_]:=(k=1; While[Sum[(-1)^PrimeNu@j, {j, k}]!=-n, k++]; k); Array[a, 6] (* Giorgos Kalogeropoulos, Jul 19 2021 *)
PROG
(PARI) a(n) = my(k=1); while (sum(j=1, k, (-1)^omega(j)) != -n, k++); k; \\ Michel Marcus, Jul 19 2021
CROSSREFS
Sequence in context: A327984 A066906 A125884 * A001602 A308197 A087012
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jul 19 2021
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 29 15:45 EDT 2024. Contains 372114 sequences. (Running on oeis4.)