Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #29 May 09 2021 05:08:33
%S 8,11,15,17,23,31
%N 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.
%C A subsequence of A254671.
%C From _Robert Israel_, May 27 2015: (Start)
%C 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.
%C a(7) > 10^7 if it exists. (End)
%H <a href="/A256073/b256073.txt">Table of n, a(n) for n = 1..6</a>
%e 23 = 5*3 + 5 + 3 = 7*2 + 7 + 2, and 2,3,5,7 are all primes, so 23 is a term.
%e 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.
%e 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.
%p filter:= proc(n)
%p local D;
%p D:= map(`-`, numtheory:-divisors(n+1) minus {1,2,n+1,(n+1)/2},1);
%p nops(D) >= 1 and andmap(isprime,D);
%p end proc:
%p select(filter, [$1..10^6]); # _Robert Israel_, May 27 2015
%t sol[t_] := Solve[x >= y > 1 && x y + x + y == t, {x, y}, Integers];
%t Select[Range[100], AllTrue[Flatten[{x, y} /. sol[#]], PrimeQ]&] (* _Jean-François Alcover_, Jul 28 2020 *)
%o (Python)
%o import sympy
%o from sympy import isprime
%o TOP = 10000
%o a = [0]*TOP
%o no= [0]*TOP
%o for y in range(2, TOP//2):
%o for x in range(y, TOP//2):
%o k = x*y + x + y
%o if k>=TOP: break
%o if no[k]==0:
%o a[k]=1
%o if not (isprime(x) and isprime(y)): no[k]=1
%o print([n for n in range(TOP) if a[n]>0 and no[n]==0])
%Y Cf. A254671.
%K nonn
%O 1,1
%A _Alex Ratushnyak_, Mar 14 2015
%E More terms from _Lars Blomberg_, May 01 2015
%E Incorrect terms removed by _Alex Ratushnyak_, May 27 2015