A120806 Positive integers k such that k+d+1 is prime for all divisors d of k.
1, 3, 5, 9, 11, 29, 35, 39, 41, 65, 125, 179, 191, 239, 281, 419, 431, 641, 659, 749, 755, 809, 905, 935, 989, 1019, 1031, 1049, 1229, 1289, 1451, 1469, 1481, 1829, 1859, 1931, 2129, 2141, 2339, 2519, 2549, 2969, 3161, 3299, 3329, 3359, 3389, 3539, 3821, 3851
Offset: 1
Keywords
Examples
a(11) = 125 since divisors(125) = {1, 5, 25, 125} and the set of all n+d+1 is {127, 131, 151, 251} and these are all primes.
Links
- T. D. Noe, Table of n, a(n) for n=1..1000
Crossrefs
Programs
-
Maple
with(numtheory); L:=[1]: for w to 1 do for k from 1 to 12^6 while nops(L)<=1000 do x:=2*k+1; if andmap(isprime,[x+2,2*x+1]) then S:=divisors(x) minus {1,x}; Q:=map(z-> x+z+1, S); if andmap(isprime,Q) then L:=[op(L),x]; print(nops(L),ifactor(x)); fi; fi; od od; L;
-
Mathematica
q[k_] := AllTrue[Divisors[k], PrimeQ[k + # + 1] &]; Select[Range[5000], q] (* Amiram Eldar, Aug 05 2024 *)
-
PARI
is(n)=fordiv(n,d,if(!isprime(n+d+1),return(0)));1; \\ Joerg Arndt, Nov 07 2015
Comments