Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Sep 28 2021 08:34:01
%S 603,1250,1323,2523,4203,4923,4948,7442,10467,12591,18027,20402,21123,
%T 23823,31507,31850,36162,40327,54475,54511,55323,58923,63747,64386,
%U 71523,73204,79011,83151,85291,88047,97675,103923,104211,118323,120787,122571,124891,126927
%N Starts of runs of 3 consecutive numbers that have an equal number of even and odd exponents in their prime factorization (A187039).
%H Amiram Eldar, <a href="/A348077/b348077.txt">Table of n, a(n) for n = 1..10000</a>
%e 603 is a term since 603 = 3^2 * 67, 603 + 1 = 604 = 2^2 * 151 and 603 + 2 = 605 = 5 * 11^2 all have one even and one odd exponent in their prime factorization.
%t q[n_] := n == 1 || Count[(e = FactorInteger[n][[;; , 2]]), _?OddQ] == Count[e, _?EvenQ]; v = q /@ Range[3]; seq = {}; Do[v = Append[Drop[v, 1], q[k]]; If[And @@ v, AppendTo[seq, k - 2]], {k, 4, 130000}]; seq
%o (Python)
%o from sympy import factorint
%o def aupto(limit):
%o alst, condvec = [], [False, False, False]
%o for kp2 in range(4, limit+3):
%o evenodd = [0, 0]
%o for e in factorint(kp2).values():
%o evenodd[e%2] += 1
%o condvec = condvec[1:] + [evenodd[0] == evenodd[1]]
%o if all(condvec):
%o alst.append(kp2-2)
%o return alst
%o print(aupto(126927)) # _Michael S. Branicky_, Sep 27 2021
%Y Subsequence of A187039 and A348076.
%K nonn
%O 1,1
%A _Amiram Eldar_, Sep 27 2021