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.

A348078 Starts of runs of 4 consecutive numbers that have an equal number of even and odd exponents in their prime factorization (A187039).

This page as a plain text file.
%I A348078 #11 Sep 28 2021 08:34:07
%S A348078 906596,1141550,1243275,12133673,13852924,19293209,20738672,22997761,
%T A348078 23542001,26587348,30731822,31237450,39987773,41419024,43627148,
%U A348078 54040975,54652148,56487148,70289225,75855625,77449300,79677772,80665072,82126448,91420721,93883850,95162849
%N A348078 Starts of runs of 4 consecutive numbers that have an equal number of even and odd exponents in their prime factorization (A187039).
%H A348078 Amiram Eldar, <a href="/A348078/b348078.txt">Table of n, a(n) for n = 1..1000</a>
%e A348078 906596 is a term since 906596 = 2^2 * 226649, 906596 + 1 = 906597 = 3^2 * 100733, 906596 + 2 = 906598 = 2 * 7^2 * 11 * 29^2 and 906596 + 3 = 906599 = 71 * 113^2 all have an equal number of even and odd exponents in their prime factorization.
%t A348078 q[n_] := n == 1 || Count[(e = FactorInteger[n][[;; , 2]]), _?OddQ] == Count[e, _?EvenQ]; v = q /@ Range[4]; seq = {}; Do[v = Append[Drop[v, 1], q[k]]; If[And @@ v, AppendTo[seq, k - 3]], {k, 5, 2*10^7}]; seq
%o A348078 (Python)
%o A348078 from sympy import factorint
%o A348078 def cond(n):
%o A348078     evenodd = [0, 0]
%o A348078     for e in factorint(n).values():
%o A348078         evenodd[e%2] += 1
%o A348078     return evenodd[0] == evenodd[1]
%o A348078 def afind(limit, startk=5):
%o A348078     condvec = [cond(startk+i) for i in range(4)]
%o A348078     for kp3 in range(startk+3, limit+4):
%o A348078         condvec = condvec[1:] + [cond(kp3)]
%o A348078         if all(condvec):
%o A348078             print(kp3-3, end=", ")
%o A348078 afind(125*10**4) # _Michael S. Branicky_, Sep 27 2021
%Y A348078 Subsequence of A187039, A348076 and A348077.
%K A348078 nonn
%O A348078 1,1
%A A348078 _Amiram Eldar_, Sep 27 2021