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.

A299498 Integers primitively represented by cyclotomic binary forms.

Original entry on oeis.org

3, 5, 7, 10, 11, 13, 17, 19, 21, 25, 26, 29, 31, 34, 37, 39, 41, 43, 49, 50, 53, 55, 57, 58, 61, 65, 67, 73, 74, 79, 82, 85, 89, 91, 93, 97, 101, 103, 106, 109, 111, 113, 121, 122, 125, 127, 129, 130, 133, 137, 139, 145, 146, 147, 149, 151, 157, 163, 169, 170
Offset: 1

Views

Author

Peter Luschny, Feb 25 2018

Keywords

Comments

A cyclotomic binary form over Z is a homogeneous polynomial in two variables which has the form f(x, y) = y^EulerPhi(k)*CyclotomicPolynomial(k, x/y) where k is some integer >= 3. An integer n is primitively represented by f if f(x,y) = n has an integer solution such that x is prime to y.

Crossrefs

Programs

  • Julia
    using Nemo
    function isA299498(n)
        isPrimeTo(n, k) = gcd(ZZ(n), ZZ(k)) == ZZ(1)
        R, x = PolynomialRing(ZZ, "x")
        K = Int(floor(5.383*log(n)^1.161)) # Bounds from
        M = Int(floor(2*sqrt(n/3)))  # Fouvry & Levesque & Waldschmidt
        N = QQ(n)
        for k in 3:K
            e = Int(eulerphi(ZZ(k)))
            c = cyclotomic(k, x)
            for m in 1:M, j in m+1:M if isPrimeTo(m, j)
                N == m^e*subst(c, QQ(j,m)) && return true
        end end end
        return false
    end
    A299498list(upto) = [n for n in 1:upto if isA299498(n)]
    print(A299498list(170))