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!)
A275547 Numbers n that have an equal number of even and odd values of A001221(k) for 1 <= k <= n. 6
2, 40, 46, 48, 50, 7960, 7962, 7984, 7986, 8808, 8810, 8812, 8816, 8822, 8824, 8826, 8828, 8830, 8836, 8844, 8846, 8848, 8850, 8854, 8856, 8858, 8860, 8862, 8864, 8866, 8872, 8878, 8970, 8972, 8974, 9064, 9078, 9080, 9082, 9084, 9086, 9088, 9096, 9164, 9220 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Is this sequence infinite?
LINKS
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
Sequence in context: A213909 A349717 A349726 * A269544 A281761 A370069
KEYWORD
nonn
AUTHOR
G. L. Honaker, Jr., Aug 01 2016
EXTENSIONS
More terms from Alois P. Heinz, Aug 02 2016
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 17 21:16 EDT 2024. Contains 371767 sequences. (Running on oeis4.)