

A256073


Numbers n representable as x*y + x + y, where x >= y > 1, such that all x's and y's in all representation(s) of n are primes.


2




OFFSET

1,1


COMMENTS

n such that n+1 is not prime and not twice a prime, but every divisor of n+1 except for 1, 2, n+1 and (n+1)/2 is in A008864.
a(7) > 10^7 if it exists. (End)


LINKS



EXAMPLE

23 = 5*3 + 5 + 3 = 7*2 + 7 + 2, and 2,3,5,7 are all primes, so 23 is a term.
71 = 11*5 + 11 + 5 = 17*3 + 17 + 3 = 23*2 + 23 + 2 = 7*8 + 8 + 7, but 8 is not a prime so 71 is not a term.
35 = 5*5 + 5 + 5 = 11*2 + 11 + 2 = 8*3 + 8 + 3, but 8 is not a prime so 35 is not a term.


MAPLE

filter:= proc(n)
local D;
D:= map(``, numtheory:divisors(n+1) minus {1, 2, n+1, (n+1)/2}, 1);
nops(D) >= 1 and andmap(isprime, D);
end proc:


MATHEMATICA

sol[t_] := Solve[x >= y > 1 && x y + x + y == t, {x, y}, Integers];


PROG

(Python)
import sympy
from sympy import isprime
TOP = 10000
a = [0]*TOP
no= [0]*TOP
for y in range(2, TOP//2):
for x in range(y, TOP//2):
k = x*y + x + y
if k>=TOP: break
if no[k]==0:
a[k]=1
if not (isprime(x) and isprime(y)): no[k]=1
print([n for n in range(TOP) if a[n]>0 and no[n]==0])


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



