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”).

A260801
Primes p such that A008908(p) is also prime.
0
2, 7, 17, 29, 31, 71, 89, 107, 113, 127, 131, 157, 181, 223, 239, 263, 271, 277, 281, 283, 313, 337, 379, 409, 419, 421, 431, 503, 547, 571, 577, 691, 701, 727, 757, 809, 821, 857, 883, 947, 953, 971, 1031, 1109, 1129, 1153, 1163, 1231, 1283, 1291, 1327, 1361, 1447, 1487, 1531, 1559, 1567, 1583
OFFSET
1,1
EXAMPLE
7 is prime and A008908(7) is 17, which is also prime. Therefore, 7 is in the sequence.
MATHEMATICA
collatz[n_]:=If[EvenQ[n], n/2, 3*n+1];
seq[n_]:=Length[NestWhileList[collatz, n, #!= 1&]]
Select[Flatten[Position[seq/@Range[7!], _?PrimeQ]], PrimeQ]
PROG
(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
forprime(p=1, 10^3, if(isprime(T(p)), print1(p, ", "))) \\ Derek Orr, Aug 27 2015
CROSSREFS
Cf. A008908.
Sequence in context: A049582 A220273 A276698 * A031377 A019357 A024920
KEYWORD
easy,nonn
AUTHOR
Ivan N. Ianakiev, Jul 31 2015
STATUS
approved