OFFSET
1,1
COMMENTS
Equivalently these are the integers represented by a cyclotomic binary form Phi_p(x,y) where p is prime and x and y are positive integers with max(x,y) >= 2. A cyclotomic binary form (over Z) is a homogeneous polynomial in two variables of the form f(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 efficient and safe calculation of this sequence requires a precise knowledge of the range of possible solutions of the associated Diophantine equations. The bounds used in the Julia program below were specified by Fouvry, Levesque and Waldschmidt.
LINKS
Peter Luschny, Table of n, a(n) for n = 1..10000
Étienne Fouvry, Claude Levesque, Michel Waldschmidt, Representation of integers by cyclotomic binary forms, arXiv:1712.09019 [math.NT], 2017.
EXAMPLE
Let p denote an odd prime. Subsequences are numbers of the form
2^p - 1, (A001348) (x = 1, y = 2) (Mersenne numbers),
p*2^(p - 1), (A299795) (x = 2, y = 2),
(3^p - 1)/2, (A003462) (x = 1, y = 3),
3^p - 2^p, (A135171) (x = 2, y = 3),
p*3^(p - 1), (A027471) (x = 3, y = 3),
(4^p - 1)/3, (A002450) (x = 1, y = 4),
2^(p-1)*(2^p-1), (A006516) (x = 2, y = 4),
4^p - 3^p, (A005061) (x = 3, y = 4),
p*4^(p - 1), (A002697) (x = 4, y = 4),
(p^p-1)/(p-1), (A023037),
.
The generalized cuban primes A007645 are a subsequence, as are the quintan primes A002649, the septan primes and so on.
All primes in this sequence less than 1031 are generalized cuban primes. 1031 is an element because 1031 = f(5,2) where f(x,y) = x^4 + y*x^3 + y^2*x^2 + y^3*x + y^4, however 1031 is not a cuban prime because 1030 is not divisible by 6.
PROG
(Julia)
using Primes
function isA300332(n)
logn = log(n)^1.161
K = Int(floor(5.383*logn))
M = Int(floor(2*(n/3)^(1/2)))
k = 2
while k <= K
if k == 7
K = Int(floor(4.864*logn))
M = Int(ceil(2*(n/11)^(1/4)))
end
for y in 2:M, x in 1:y
r = x == y ? k*y^(k - 1) : div(x^k - y^k, x - y)
n == r && return true
end
k = nextprime(k+1)
end
return false
end
A300332list(upto) = [n for n in 1:upto if isA300332(n)]
println(A300332list(200))
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Mar 03 2018
STATUS
approved