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.

A348077 Starts of runs of 3 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 A348077 #11 Sep 28 2021 08:34:01
%S A348077 603,1250,1323,2523,4203,4923,4948,7442,10467,12591,18027,20402,21123,
%T A348077 23823,31507,31850,36162,40327,54475,54511,55323,58923,63747,64386,
%U A348077 71523,73204,79011,83151,85291,88047,97675,103923,104211,118323,120787,122571,124891,126927
%N A348077 Starts of runs of 3 consecutive numbers that have an equal number of even and odd exponents in their prime factorization (A187039).
%H A348077 Amiram Eldar, <a href="/A348077/b348077.txt">Table of n, a(n) for n = 1..10000</a>
%e A348077 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 A348077 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 A348077 (Python)
%o A348077 from sympy import factorint
%o A348077 def aupto(limit):
%o A348077     alst, condvec = [], [False, False, False]
%o A348077     for kp2 in range(4, limit+3):
%o A348077         evenodd = [0, 0]
%o A348077         for e in factorint(kp2).values():
%o A348077             evenodd[e%2] += 1
%o A348077         condvec = condvec[1:] + [evenodd[0] == evenodd[1]]
%o A348077         if all(condvec):
%o A348077             alst.append(kp2-2)
%o A348077     return alst
%o A348077 print(aupto(126927)) # _Michael S. Branicky_, Sep 27 2021
%Y A348077 Subsequence of A187039 and A348076.
%K A348077 nonn
%O A348077 1,1
%A A348077 _Amiram Eldar_, Sep 27 2021