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-3 of 3 results.

A299795 Numbers of the form p*2^(p-1) where p is prime.

Original entry on oeis.org

4, 12, 80, 448, 11264, 53248, 1114112, 4980736, 96468992, 7784628224, 33285996544, 2542620639232, 45079976738816, 189115999977472, 3307330976350208, 238690780250636288, 17005592192950992896, 70328211781017665536, 4943727411754159833088, 83822005070936202543104
Offset: 1

Views

Author

Peter Luschny, Mar 03 2018

Keywords

Crossrefs

A subsequence of A001787 and A300332.

Programs

  • Magma
    [NthPrime(n)*2^(NthPrime(n) -1): n in [1..30]]; // G. C. Greubel, Mar 07 2018
  • Maple
    Primes := select(isprime, [$1..71]):
    seq(p*2^(p-1), p in Primes);
  • Mathematica
    Table[Prime[n]*2^(Prime[n] -1), {n,1,30}] (* G. C. Greubel, Mar 07 2018 *)
  • PARI
    a(n) = my(p = prime(n)); p*2^(p-1); \\ Michel Marcus, Mar 07 2018
    

Formula

From Michel Marcus, Mar 07 2018: (Start)
a(n) = prime(n)*2^(prime(n)-1).
a(n) = A000040(n)*A061286(n).
a(n) = A001787(A000040(n)).
(End)

A300333 a(n) = max{ p prime | n = Sum_{j in 0:p-1} x^j*y^(p-j-1)} where x and y are positive integers with max(x, y) >= 2 or 0 if no such representation exists.

Original entry on oeis.org

0, 0, 2, 2, 0, 0, 3, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 3, 3, 0, 0, 5, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 3, 3, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 3, 3, 0, 0, 3, 5, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 3, 0, 3, 3, 0, 0, 0, 0, 3, 0, 0, 0, 5
Offset: 1

Views

Author

Peter Luschny, Mar 03 2018

Keywords

Comments

All prime numbers appear as values. The earliest appearance of the prime p has the index 2^p - 1 (Mersenne number).
The indices of the nonzero values are in A300332.

Examples

			Let f(x,y) = y^2 + x*y + x^2, g(x,y) = y^6 + x*y^5 + x^2*y^4 + x^3*y^3 + x^4*y^2 + x^5*y + x^6 and h(x,y) = Sum_{j in 0:10} x^j*y^(10-j). Then
a(49) = 3 because 49 = f(5, 3).
a(217) = 3 because 217 = f(13, 3).
a(448) = 7 because 448 = g(2, 2).
a(2047) = 11 because 2047 = h(2, 1).
		

Crossrefs

Programs

  • Julia
    using Primes, Nemo
    function A300333(n)
        R, z = PolynomialRing(ZZ, "z")
        N = QQ(n)
        # Bounds from Fouvry & Levesque & Waldschmidt
        logn = log(n)^1.161
        K = Int(floor(5.383*logn))
        M = Int(floor(2*(n/3)^(1/2)))
        k, p = 2, 0
        while k <= K
            if k == 7
                K = Int(ceil(4.864*logn))
                M = Int(ceil(2*(n/11)^(1/4)))
            end
            e = Int(eulerphi(ZZ(k)))
            c = cyclotomic(k, z)
            for y in 2:M, x in 1:y
                N == y^e*subst(c, QQ(x,y)) &&  (p = k)
            end
            k = nextprime(k+1)
        end
        return p
    end
    A300333list(upto) = [A300333(n) for n in 1:upto]
    println(A300333list(121))

A300331 Integers represented by a cyclotomic binary form Phi{k}(x,y) with positive integers x and y where max(x, y) >= 2 and the index k is not prime.

Original entry on oeis.org

5, 8, 9, 10, 11, 16, 17, 18, 20, 25, 26, 29, 32, 34, 36, 40, 41, 45, 50, 53, 55, 58, 64, 65, 68, 72, 74, 81, 82, 85, 89, 90, 98, 100, 101, 104, 106, 113, 116, 122, 125, 128, 130, 136, 137, 144, 145, 146, 149, 153, 160, 162, 164, 170, 173, 176, 178, 180, 185
Offset: 1

Views

Author

Peter Luschny, Mar 06 2018

Keywords

Comments

A cyclotomic binary form is a homogeneous polynomial in two variables of the form p(x, y) = y^phi(k)*Phi(k, x/y) where Phi(k, z) is a cyclotomic polynomial of index k and phi is Euler's totient function. An integer m is represented by p if p(x,y) = m has an integer solution.
m is in this sequence if and only if m is in A296095 but not in A300332. This means m can be represented by a cyclotomic binary form but not as m = Sum_{j in 0:p-1} x^j*y^(p-j-1) with p prime.

Examples

			1037 is in this sequence because 1037 = f(26,19) = f(29,14) with f(x,y) = y^2 + x^2 are the only representations of 1037 by a cyclotomic binary form (which has index 4).
1031 is not in this sequence because 1031 = f(5,2) where f(x,y) = x^4 + y*x^3 + y^2*x^2 + y^3*x + y^4 (which has index 5).
		

Crossrefs

Programs

  • Julia
    using Nemo
    function isA300331(n)
        R, z = PolynomialRing(ZZ, "z")
        N = QQ(n)
        # Bounds from Fouvry & Levesque & Waldschmidt
        logn = log(n)^1.161
        K = Int(floor(5.383*logn))
        M = Int(floor(2*(n/3)^(1/2)))
        r = false
        k = 2
        while k <= K
            if k == 7
                K = Int(ceil(4.864*logn))
                M = Int(ceil(2*(n/11)^(1/4)))
            end
                e = Int(eulerphi(ZZ(k)))
                c = cyclotomic(k, z)
                for y in 2:M, x in 1:y
                    if N == y^e*subst(c, QQ(x, y))
                        isprime(ZZ(k)) && return false
                        r = true
                    end
                end
            k += 1
        end
        return r
    end
    A300331list(upto) = [n for n in 1:upto if isA300331(n)]
    println(A300331list(185))
Showing 1-3 of 3 results.