A165803 Integers n such that the trajectory of n under repeated applications of the map k->(k-3)/2 is a chain of primes that reaches 2 or 3 (n itself need not be a prime).
2, 3, 7, 9, 17, 37, 77
Offset: 1
Examples
(77-3)/2 = 37 (prime); (37-3)/2 = 17 (prime); (17-3)/2 = 7 (prime); (7-3)/2 = 2; stop (because 2 has been reached).
Programs
-
Mathematica
f[n_] := Module[{k = n}, While[k > 3, k = (k - 3)/2; If[ !PrimeQ[k], Break[]]]; PrimeQ[k]]; A165803 = {}; Do[If[f[n], AppendTo[A165803, n]], {n, 5!}]; A165803 cpQ[n_]:=AllTrue[Rest[NestWhileList[(#-3)/2&,n,#!=2&!=3&,1,20]],PrimeQ]; Select[Range[100],cpQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 24 2019 *)
Extensions
Edited by Jon E. Schoenfield, Dec 01 2013
Further edited by N. J. A. Sloane, Dec 02 2013
Comments