|
|
A022803
|
|
Numbers that reach ...,7,8,4,2,1 under the mapping: if n is even divide by 2 else add 1.
|
|
3
|
|
|
13, 14, 25, 26, 27, 28, 49, 50, 51, 52, 53, 54, 55, 56, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MATHEMATICA
|
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 *)
|
|
PROG
|
(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" ")) ) ) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|