%I #16 Oct 10 2017 16:41:41
%S 13,14,25,26,27,28,49,50,51,52,53,54,55,56,97,98,99,100,101,102,103,
%T 104,105,106,107,108,109,110,111,112,193,194,195,196,197,198,199,200,
%U 201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218
%N Numbers that reach ...,7,8,4,2,1 under the mapping: if n is even divide by 2 else add 1.
%C 7 itself does not qualify, by decree. - _N. J. A. Sloane_, Sep 02 2017
%H Harvey P. Dale, <a href="/A022803/b022803.txt">Table of n, a(n) for n = 1..1000</a>
%t nr7Q[n_]:=Module[{trms=NestWhileList[If[EvenQ[#],#/2,#+1]&,n,#!=1&]}, Length[ trms]>4 && trms[[-5]]==7]; Select[Range[8,220],nr7Q] (* _Harvey P. Dale_, Oct 10 2017 *)
%o (PARI) xnp1(n,p) = { for(x=1,n, p1 = x; while(p1>1, if(p1%2==0,p1/=2,p1 = p1*p+1;); if(p1==7,print1(x" ")) ) ) }
%K easy,nonn
%O 1,1
%A _Cino Hilliard_, Mar 23 2003