login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes p such that A008908(p) is also prime.
0

%I #15 Sep 22 2015 05:09:24

%S 2,7,17,29,31,71,89,107,113,127,131,157,181,223,239,263,271,277,281,

%T 283,313,337,379,409,419,421,431,503,547,571,577,691,701,727,757,809,

%U 821,857,883,947,953,971,1031,1109,1129,1153,1163,1231,1283,1291,1327,1361,1447,1487,1531,1559,1567,1583

%N Primes p such that A008908(p) is also prime.

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%e 7 is prime and A008908(7) is 17, which is also prime. Therefore, 7 is in the sequence.

%t collatz[n_]:=If[EvenQ[n],n/2,3*n+1];

%t seq[n_]:=Length[NestWhileList[collatz,n,#!= 1&]]

%t Select[Flatten[Position[seq/@Range[7!],_?PrimeQ]],PrimeQ]

%o (PARI) T(n)=c=0;while(n!=1,if(n%2,n=3*n+1;c++);if(!(n%2),n=n/2;c++));c+1

%o forprime(p=1,10^3,if(isprime(T(p)),print1(p,", "))) \\ _Derek Orr_, Aug 27 2015

%Y Cf. A008908.

%K easy,nonn

%O 1,1

%A _Ivan N. Ianakiev_, Jul 31 2015