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.

Showing 1-4 of 4 results.

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

Original entry on oeis.org

603, 1250, 1323, 2523, 4203, 4923, 4948, 7442, 10467, 12591, 18027, 20402, 21123, 23823, 31507, 31850, 36162, 40327, 54475, 54511, 55323, 58923, 63747, 64386, 71523, 73204, 79011, 83151, 85291, 88047, 97675, 103923, 104211, 118323, 120787, 122571, 124891, 126927
Offset: 1

Views

Author

Amiram Eldar, Sep 27 2021

Keywords

Examples

			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.
		

Crossrefs

Subsequence of A187039 and A348076.

Programs

  • Mathematica
    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
  • Python
    from sympy import factorint
    def aupto(limit):
        alst, condvec = [], [False, False, False]
        for kp2 in range(4, limit+3):
            evenodd = [0, 0]
            for e in factorint(kp2).values():
                evenodd[e%2] += 1
            condvec = condvec[1:] + [evenodd[0] == evenodd[1]]
            if all(condvec):
                alst.append(kp2-2)
        return alst
    print(aupto(126927)) # Michael S. Branicky, Sep 27 2021

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

Original entry on oeis.org

906596, 1141550, 1243275, 12133673, 13852924, 19293209, 20738672, 22997761, 23542001, 26587348, 30731822, 31237450, 39987773, 41419024, 43627148, 54040975, 54652148, 56487148, 70289225, 75855625, 77449300, 79677772, 80665072, 82126448, 91420721, 93883850, 95162849
Offset: 1

Views

Author

Amiram Eldar, Sep 27 2021

Keywords

Examples

			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.
		

Crossrefs

Subsequence of A187039, A348076 and A348077.

Programs

  • Mathematica
    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
  • Python
    from sympy import factorint
    def cond(n):
        evenodd = [0, 0]
        for e in factorint(n).values():
            evenodd[e%2] += 1
        return evenodd[0] == evenodd[1]
    def afind(limit, startk=5):
        condvec = [cond(startk+i) for i in range(4)]
        for kp3 in range(startk+3, limit+4):
            condvec = condvec[1:] + [cond(kp3)]
            if all(condvec):
                print(kp3-3, end=", ")
    afind(125*10**4) # Michael S. Branicky, Sep 27 2021

A356415 a(n) is the least start of exactly n consecutive numbers that have an equal number of even and odd exponents in their prime factorization (A187039), or -1 if no such run of consecutive numbers exists.

Original entry on oeis.org

1, 44, 603, 906596, 792007675
Offset: 1

Views

Author

Amiram Eldar, Aug 06 2022

Keywords

Comments

a(6) > 6.5*10^10, if it exist.

Examples

			a(2) = 44 since 44 = 2^2 * 11 and 45 = 3^2 * 5 both have one even and one odd exponent in their prime factorization, 43 and 46 have no even exponent, and 44 is the least number with this property.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (-1)^e; q[1] = True; q[n_] := Plus @@ f @@@ FactorInteger[n] == 0; seq[len_, nmax_] := Module[{s = Table[0, {len}], v = {1}, n = 2, c = 0, m}, While[c <= len && n <= nmax, If[q[n], v = Join[v, {n}], m = Length[v]; v = {}; If[0 <= m <= len && s[[m]] == 0, c++; s[[m]] = n - m]]; n++]; s]; seq[4, 10^6]

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

Original entry on oeis.org

792007675, 2513546971, 2820448771, 3201296272, 4742326672, 4894282924, 5462510272, 5664816448, 6947006272, 7814337424, 8784450448, 9085360624, 10147712524, 10246365547, 11537724975, 11861786572, 11907710548, 12456672496, 13338112048, 13510075471, 13931933948
Offset: 1

Views

Author

Amiram Eldar, Sep 27 2021

Keywords

Examples

			792007675 is a term since 792007675 = 2^2 * 31680307, 792007675 + 1 = 792007676 = 2^2 * 198001919, 792007675 + 2 = 792007677 = 3^2 * 88000853, 792007675 + 3 = 792007678 = 2 * 7^2 * 11^2 * 66791 and 792007675 + 4 = 792007679 = 17^2 * 2740511 all have an equal number of even and odd exponents in their prime factorization.
		

Crossrefs

Subsequence of A187039, A348076, A348077 and A348078.

Programs

  • Mathematica
    q[n_] := n == 1 || Count[(e = FactorInteger[n][[;; , 2]]), ?OddQ] == Count[e, ?EvenQ]; v = q /@ Range[5]; seq = {}; Do[v = Append[Drop[v, 1], q[k]]; If[And @@ v, AppendTo[seq, k - 4]], {k, 6, 3*10^9}]; seq
  • Python
    from sympy import factorint
    def cond(n):
        evenodd = [0, 0]
        for e in factorint(n).values():
            evenodd[e%2] += 1
        return evenodd[0] == evenodd[1]
    def afind(limit, startk=6):
        condvec = [cond(startk+i) for i in range(5)]
        for kp4 in range(startk+4, limit+5):
            condvec = condvec[1:] + [cond(kp4)]
            if all(condvec):
                print(kp4-4, end=", ")
    afind(10**9) # Michael S. Branicky, Sep 27 2021
Showing 1-4 of 4 results.