login
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
8, 11, 15, 17, 23, 31
OFFSET
1,1
COMMENTS
A subsequence of A254671.
From Robert Israel, May 27 2015: (Start)
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)
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:
select(filter, [$1..10^6]); # Robert Israel, May 27 2015
MATHEMATICA
sol[t_] := Solve[x >= y > 1 && x y + x + y == t, {x, y}, Integers];
Select[Range[100], AllTrue[Flatten[{x, y} /. sol[#]], PrimeQ]&] (* Jean-François Alcover, Jul 28 2020 *)
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
Cf. A254671.
Sequence in context: A028394 A188199 A078117 * A032423 A063724 A317770
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Mar 14 2015
EXTENSIONS
More terms from Lars Blomberg, May 01 2015
Incorrect terms removed by Alex Ratushnyak, May 27 2015
STATUS
approved