OFFSET
1,1
COMMENTS
All the primes, except the first, are of the form p1 = 6k - 1, p2 = 12k - 1, p3 = 72k^2 - 18k - 1, with k = 1, 2, 5, 9, 14, 29, 40, 47, 60, 72, 120, 127, 135, 152, 172, 184, ...
The generated Lucas-Carmichael numbers are 399, 2915, 63503, 2924099, 32148899, 192099599, 3603600899, 13105670399, 25027872803, ...
Subsequence of A005384 (Sophie Germain primes).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
p1 = 3 is in the sequence since with p2 = 2*3 + 1 = 7 and p3 = 3*7 - 2 = 19 they are all primes. 3*7*19 = 399 is a Lucas-Carmichael number.
MATHEMATICA
aQ[n_] := AllTrue[{n, 2n+1, 2 n^2+n-2}, PrimeQ]; Select[Range[10^3], aQ]
Select[Prime[Range[1000]], AllTrue[{2#+1, #(2#+1)-2}, PrimeQ]&] (* Harvey P. Dale, Aug 16 2024 *)
PROG
(PARI) is(n) = if(!ispseudoprime(n), return(0), my(p=2*n+1); if(!ispseudoprime(p), return(0), if(ispseudoprime(n*p-2), return(1)))); 0 \\ Felix Fröhlich, Sep 18 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Sep 18 2017
STATUS
approved