A120776 Composite numbers k such that k+d+1 is prime for all divisors d of k greater than 1.
8, 9, 35, 39, 65, 119, 125, 219, 341, 515, 749, 755, 905, 935, 989, 1043, 1119, 1343, 1355, 1469, 1649, 1829, 1859, 2519, 3005, 3161, 3563, 3953, 4193, 4269, 4359, 4613, 4685, 4769, 4859, 5123, 5165, 5249, 5585, 5699, 5723, 6005, 6059, 6239, 6629, 6879
Offset: 1
Keywords
Examples
a(9)=935=5*11*17 since the divisors d greater than one are {5,11,17,55,85,187,935} and all elements in the set of n+d+1, {941,947,953,991,1021,1123,1871}, are primes.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
Programs
-
Maple
with(numtheory); P:=[]: for w to 1 do for k from 2 do #start at 1, get first element 1 if not isprime(k) and isprime(2*k+1) then S:=divisors(k) minus {1,k}; Q:=map(z-> z+k+1, S); if andmap(isprime,Q) then P:=[op(P),k]; print(nops(P),k,ifactor(k)) fi; fd:=fopen("C:/temp/n+d+1=prime-1st-1000.txt",APPEND); fprintf(fd,"%d ",x); fclose(fd); if nops(P)=1000 then break fi; fi; od od;
-
Mathematica
Select[Range[7000],CompositeQ[#]&&AllTrue[#+1+Rest[Divisors[#]],PrimeQ]&] (* Harvey P. Dale, Mar 14 2023 *)
-
PARI
is(n)=if(isprime(n)||n<8, return(0)); fordiv(n, d, if(!isprime(n+d+1), return(0))); 1 \\ Charles R Greathouse IV, Feb 05 2017
Comments