login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165801 f(n), f(f(n)), ... are all prime, where f(n) = (n-1)/2. Stop when f(...f(n)...) is less than 4. 3

%I #6 Sep 03 2013 23:46:22

%S 1,2,3,5,7,11,15,23,47,95

%N f(n), f(f(n)), ... are all prime, where f(n) = (n-1)/2. Stop when f(...f(n)...) is less than 4.

%C There are no more terms since 95 is composite.

%e (95-1)/2=47(prime); (47-1)/2=23(prime); (23-1)/2=11(prime); (11-1)/2=5(prime); (5-1)/2=2(prime); no composite numbers smaller than 2 exist, end. (47-1)/2=23(prime);(23-1)/2=11(prime); (11-1)/2=5(prime); (5-1)/2=2; no composite numbers smaller than 2 exist, end.

%t f[n_]:=Module[{k=n},While[k>3,k=(k-1)/2;If[ !PrimeQ[k],Break[]]];PrimeQ[k]]; lst={};Do[If[f[n],AppendTo[lst,n]],{n,5!}];lst

%K nonn,easy,fini,full

%O 1,2

%A _Vladimir Joseph Stephan Orlovsky_, Sep 28 2009

%E Corrected and edited by _Charles R Greathouse IV_, Oct 05 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 14:10 EDT 2024. Contains 371792 sequences. (Running on oeis4.)