OFFSET
1,1
COMMENTS
Is this sequence infinite?
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
FORMULA
A174863(a(n)) = 0. - Alois P. Heinz, Aug 02 2016
EXAMPLE
a(2) = 40 because if we check omega(n) = A001221(n) for each n = 1..40, then half will be even numbers and half will be odd numbers.
MAPLE
omega:= n-> nops(numtheory[factorset](n)):
b:= proc(n) option remember; (-1)^omega(n)+`if`(n>1, b(n-1), 0) end:
a:= proc(n) option remember; local k; for k from 1+
`if`(n=1, 0, a(n-1)) while b(k)<>0 do od; k
end:
seq(a(n), n=1..50); # Alois P. Heinz, Aug 02 2016
MATHEMATICA
a[1] = 2; a[n_] := a[n] = Block[{k = a[n-1], s=0}, While[(s += (-1)^ PrimeNu[++k]) != 0]; k]; Array[a, 100] (* Giovanni Resta, Aug 03 2016 *)
PROG
(PARI) is(n) = my(i=0, j=0); for(k=1, n, if(omega(k)%2==0, i++, j++)); if(i==j, return(1), return(0)) \\ Felix Fröhlich, Aug 02 2016
(PARI) isok(n) = {my(v = vector(n, k, omega(k))); #select(x->x % 2 == 1, v) == n/2; } \\ Michel Marcus, Aug 02 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
G. L. Honaker, Jr., Aug 01 2016
EXTENSIONS
More terms from Alois P. Heinz, Aug 02 2016
STATUS
approved