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.

Previous Showing 21-21 of 21 results.

A321962 Where the zeros in A123066 occur.

Original entry on oeis.org

1, 51, 53, 7955, 7959, 7961, 7985, 7987, 8245, 8805, 8807, 8809, 8813, 8815, 8817, 8819, 8821, 8825, 8829, 8847, 8851, 8853, 8855, 8857, 8859, 8873, 8877, 8879, 8969, 8973, 8975, 9063, 9079, 9081, 9083, 9089, 9091, 9093, 9095, 9097, 9163, 9165, 9215, 9219
Offset: 1

Views

Author

Peter Luschny, Dec 21 2018

Keywords

Comments

Let pp(n) be the prime parity of n, defined as 1 if the number of distinct primes dividing n is odd and -1 if it is even; by convention pp(1) = 0. The cumulative sum of pp is A123066. We call the initial segment of the integers [1..n] balanced with respect to prime parity if the cumulative sum of pp(n) is 0. [1..a(n)] give the balanced segments.

Crossrefs

Programs

  • Maple
    a_list := proc(len) local omega, c, L, j; c := 0; L := 1;
    omega := n -> nops(numtheory[factorset](n));
    for j from 2 to len do
       c := c + (-1)^omega(j);
       if c = 0 then L := L,j fi
    od; L end: a_list(10000);
  • Mathematica
    A123066[n_] := Join[{0}, Accumulate[Table[-(-1)^PrimeNu[j], {j,2,n}]]];
    A321962List[n_] := Position[A123066[n], 0] // Flatten;
    A321962List[10000]
Previous Showing 21-21 of 21 results.