cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A275547 Numbers n that have an equal number of even and odd values of A001221(k) for 1 <= k <= n.

Original entry on oeis.org

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
Offset: 1

Views

Author

G. L. Honaker, Jr., Aug 01 2016

Keywords

Comments

Is this sequence infinite?

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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

Formula

A174863(a(n)) = 0. - Alois P. Heinz, Aug 02 2016

Extensions

More terms from Alois P. Heinz, Aug 02 2016