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.

A177000 The Collatz iteration of these primes produces only even numbers, primes and 1.

This page as a plain text file.
%I A177000 #27 Feb 16 2025 08:33:12
%S A177000 2,3,5,7,11,13,17,19,29,37,53,59,67,89,101,131,149,157,179,181,197,
%T A177000 241,269,277,349,397,739,853,1109,1237,1429,1621,1861,1877,2161,2389,
%U A177000 2531,2957,3413,3797,4549,5717,7621,10069,13397,17749,20021,31541,40277
%N A177000 The Collatz iteration of these primes produces only even numbers, primes and 1.
%C A177000 The Collatz iteration of primes of the form (10*4^k-1)/3 produces only one additional prime: 5. The Collatz iteration of primes of the form (13*4^k-1)/3 produces only two additional primes: 5 and 13. This sequence is probably infinite.
%C A177000 In a sense, these are the simplest Collatz iterations starting with a prime number. Except for the increases (3x+1) when an odd prime occurs, the sequence produced by starting with a(n) is decreasing. All the primes that occur in such a Collatz iteration are in this sequence. - _T. D. Noe_, Oct 05 2011
%H A177000 Donovan Johnson and T. D. Noe, <a href="/A177000/b177000.txt">Table of n, a(n) for n = 1..10000</a> (Donovan Johnson to 203 terms)
%H A177000 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CollatzProblem.html">Collatz Problem</a>
%H A177000 Wikipedia, <a href="http://en.wikipedia.org/wiki/Collatz_conjecture">Collatz conjecture</a>
%H A177000 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%e A177000 The Collatz iteration of 7 produces 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, and 1, which are either even, prime, or 1.
%t A177000 Collatz[n_] := NestWhileList[If[EvenQ[ # ], #/2, 3#+1] &, n, #>1 &]; Reap[Do[p=Prime[n]; s=Most[Select[Collatz[p],OddQ]]; If[And@@PrimeQ[s], Sow[p]], {n,PrimePi[10^4]}]][[2,1]]
%t A177000 oenQ[n_]:=AllTrue[DeleteCases[Most[NestWhileList[If[EvenQ[#],#/2, 3#+1]&,n, #>1&]], _?PrimeQ],EvenQ]; Select[Prime[Range[5000]], oenQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Dec 28 2014 *)
%o A177000 (Haskell)
%o A177000 a177000 n = a177000_list !! (n-1)
%o A177000 a177000_list = filter (all (\x -> even x || a010051' x == 1) .
%o A177000                        (init . a070165_row)) a000040_list
%o A177000 -- _Reinhard Zumkeller_, Apr 03 2012
%o A177000 (PARI) is(n)=isprime(n) && (n<23 || is((3*n+1)>>valuation(3*n+1,2))) \\ _Charles R Greathouse IV_, Jun 20 2013
%Y A177000 Cf. A055509, A078350, A078373, A070165, A010051.
%K A177000 nonn,nice
%O A177000 1,1
%A A177000 _T. D. Noe_, Apr 30 2010