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.
%I A276260 #27 Jun 23 2022 20:39:19 %S A276260 5,13,17,53,61,107,251,283,1367 %N A276260 Odd primes p such that p is in the trajectory of p+1 under the Collatz 3x+1 map (A014682). %C A276260 a(10) > 10^7 if it exists. - _Felix Fröhlich_, Aug 26 2016 %C A276260 a(10) > 10^9 if it exists. - _Charles R Greathouse IV_, Aug 26 2016 %C A276260 a(10) > 10^12 if it exists. - _Charles R Greathouse IV_, Sep 07 2016 %H A276260 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %t A276260 Select[Prime@ Range[2, 10^5], MemberQ[NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, # + 1, # > 1 &], #] &] (* _Michael De Vlieger_, Aug 26 2016 *) %o A276260 (JavaScript) function isit_collatz_prime(p) %o A276260 { %o A276260 var cur = p+1; %o A276260 while(cur != p && cur != 2) %o A276260 { %o A276260 if(cur%2!=0) %o A276260 { %o A276260 cur = 3*cur + 1; %o A276260 }else %o A276260 { %o A276260 cur = cur/2; %o A276260 } %o A276260 } %o A276260 if(cur === p ){return "p is a Collatz prime";} %o A276260 else {return "p is not a Collatz prime";} %o A276260 } %o A276260 (PARI) next_collatz_iteration(n) = if(n%2==1, return(3*n+1), return(n/2)) %o A276260 is(n) = if(n%2==1 && ispseudoprime(n), my(k=n+1); while(k > 1, k=next_collatz_iteration(k); if(k==n, return(1)))); 0 \\ _Felix Fröhlich_, Aug 26 2016 %o A276260 (PARI) has(n)=my(k=n+1); k>>=valuation(k,2); while(k>1, k+=(k+1)>>1; k>>=valuation(k,2); if(k==n, return(1))); 0 %o A276260 forprime(p=3,1e9, if(has(p), print1(p", "))) \\ _Charles R Greathouse IV_, Aug 26 2016 %Y A276260 Cf. A014682, A276290. %K A276260 nonn,more %O A276260 1,1 %A A276260 _Marina Ibrishimova_, Aug 26 2016