login
Nonprimes of the form prime(prime(n)) - 2*n.
0

%I #15 Sep 08 2022 08:45:40

%S 1,1,9,21,45,51,65,105,133,153,209,243,247,325,357,385,413,459,495,

%T 531,675,707,729,789,805,845,891,913,951,981,1003,1067,1083,1111,1125,

%U 1203,1313,1335,1347,1369,1395,1417,1557,1625,1703,1725,1935,1967,2133,2211

%N Nonprimes of the form prime(prime(n)) - 2*n.

%p for n from 1 to 100 do p := ithprime(ithprime(n))-2*n ; if not isprime(p) then printf("%d,",p) ; fi; od: # _R. J. Mathar_, Jan 18 2009

%t Select[Table[Prime[Prime[n]] - 2 n, {n, 80}], ! PrimeQ[#] &] (* _Vincenzo Librandi_, Jan 08 2019 *)

%o (Magma) [a: n in [1..100] | not IsPrime(a) where a is NthPrime(NthPrime(n)) -2*n]; // _Vincenzo Librandi_, Jan 08 2019

%Y Cf. A006450, A141468.

%K nonn

%O 1,3

%A _Juri-Stepan Gerasimov_, Jan 16 2009

%E 35 replaced with 45 and 645 replaced with 675 by _R. J. Mathar_, Jan 18 2009