cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A165802 Primes p with f(p), f(f(p)), ... all prime, where f(n) = (n-1)/2. Stop when f(...f(p)...) is less than 4.

This page as a plain text file.
%I A165802 #3 Mar 31 2012 12:38:27
%S A165802 2,3,5,7,11,23,47
%N A165802 Primes p with f(p), f(f(p)), ... all prime, where f(n) = (n-1)/2. Stop when f(...f(p)...) is less than 4.
%e A165802 (47-1)/2=23(prime);(23-1)/2=11(prime); (11-1)/2=5(prime); (5-1)/2=2.
%t A165802 f[n_]:=Module[{k=n},While[k>3,k=(k-1)/2;If[ !PrimeQ[k],Break[]]];PrimeQ[k]]; lst={};Do[p=Prime[n];If[f[p],AppendTo[lst,p]],{n,5!}];lst
%Y A165802 Subsequence of A165801.
%K A165802 nonn,fini,full
%O A165802 1,1
%A A165802 _Vladimir Joseph Stephan Orlovsky_, Sep 28 2009
%E A165802 Edited by _Charles R Greathouse IV_, Oct 05 2009