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.

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.

This page as a plain text file.
%I A300333 #11 Mar 07 2018 15:58:12
%S A300333 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,
%T A300333 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,
%U A300333 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
%N 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.
%C A300333 All prime numbers appear as values. The earliest appearance of the prime p has the index 2^p - 1 (Mersenne number).
%C A300333 The indices of the nonzero values are in A300332.
%H A300333 Peter Luschny, <a href="/A300333/b300333.txt">Table of n, a(n) for n = 1..10000</a>
%H A300333 Étienne Fouvry, Claude Levesque, Michel Waldschmidt, <a href="https://arxiv.org/abs/1712.09019">Representation of integers by cyclotomic binary forms</a>, arXiv:1712.09019 [math.NT], 2017.
%e A300333 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
%e A300333 a(49) = 3 because 49 = f(5, 3).
%e A300333 a(217) = 3 because 217 = f(13, 3).
%e A300333 a(448) = 7 because 448 = g(2, 2).
%e A300333 a(2047) = 11 because 2047 = h(2, 1).
%o A300333 (Julia)
%o A300333 using Primes, Nemo
%o A300333 function A300333(n)
%o A300333     R, z = PolynomialRing(ZZ, "z")
%o A300333     N = QQ(n)
%o A300333     # Bounds from Fouvry & Levesque & Waldschmidt
%o A300333     logn = log(n)^1.161
%o A300333     K = Int(floor(5.383*logn))
%o A300333     M = Int(floor(2*(n/3)^(1/2)))
%o A300333     k, p = 2, 0
%o A300333     while k <= K
%o A300333         if k == 7
%o A300333             K = Int(ceil(4.864*logn))
%o A300333             M = Int(ceil(2*(n/11)^(1/4)))
%o A300333         end
%o A300333         e = Int(eulerphi(ZZ(k)))
%o A300333         c = cyclotomic(k, z)
%o A300333         for y in 2:M, x in 1:y
%o A300333             N == y^e*subst(c, QQ(x,y)) &&  (p = k)
%o A300333         end
%o A300333         k = nextprime(k+1)
%o A300333     end
%o A300333     return p
%o A300333 end
%o A300333 A300333list(upto) = [A300333(n) for n in 1:upto]
%o A300333 println(A300333list(121))
%Y A300333 Cf. A300332, A001348.
%K A300333 nonn
%O A300333 1,3
%A A300333 _Peter Luschny_, Mar 03 2018