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.

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

Original entry on oeis.org

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

Views

Author

Ivan N. Ianakiev, Jul 31 2015

Keywords

Examples

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

Crossrefs

Cf. A008908.

Programs

  • 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]
  • 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