The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A316589 Prime numbers p whose number of steps to reach 1 in Collatz (3x+1) problem is a prime number k and, in addition, the least prime number greater than p that also reaches 1 in the same problem in a prime number of steps also does so in k steps. 0
 149, 173, 307, 373, 439, 443, 541, 557, 563, 617, 827, 863, 1297, 1303, 1373, 1453, 1489, 1627, 1657, 1667, 1733, 1783, 1861, 1901, 2029, 2053, 2393, 2423, 2591, 2609, 2647, 2657, 2677, 2767, 3037, 3067, 3253, 3319, 3343, 3361, 3433, 3461, 3467, 3517, 3659 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS EXAMPLE 149 belongs to this sequence as it is prime, it satisfies the Collatz conjecture in 23 (that is prime) steps; no other prime number greater than 149 and less than 163 satisfies the conjecture in a prime number of steps (151 does it in 15 steps; 157 in 36 steps); and the prime number 163 also satisfies it in 23 steps, just as 149 does. PROG (Python) def length_collatz_chain(start):     i=0     while start != 1:         if (start % 2 == 0):             start = start / 2         else:             start = 3 * start + 1         i = i+1     return i def is_prime(num):     if num == 1: return(0)     for k in range(2, num):        if (num % k) == 0:            return(0)     return(1) collatz = [] nmax=10000 for i in range(nmax):     collatz.append(0) collatz.append(0) for i in range(nmax):     start=i+1     collatz[start]=length_collatz_chain(start) lista_elem=[] elem=[] for i in range(1, nmax):     if is_prime(collatz[i]) and is_prime(i):         elem.append(i)         elem.append(collatz[i])         lista_elem.append(elem)         elem=[] result="" for i in range(len(lista_elem)-1):     if lista_elem[i][1]==lista_elem[i+1][1]:         result=result+str(lista_elem[i][0])+", " print(result) (PARI) nbs(n) = my(s); while(n>1, n=if(n%2, 3*n+1, n/2); s++); s; \\ A006577 lista(nn) = {vp = primes(nn); vs = select(x->isprime(nbs(x)), vp, 1); vpok = vector(#vs, k, prime(vs[k])); vpoks = vector(#vpok, k, nbs(vpok[k])); for (i=1, #vpoks-1, if (vpoks[i] == vpoks[i+1], print1(vpok[i], ", ")); ); } \\ Michel Marcus, Jul 27 2018 CROSSREFS Cf. A006577. Subsequence of A176112. Sequence in context: A190654 A308895 A100723 * A178127 A307472 A209619 Adjacent sequences:  A316586 A316587 A316588 * A316590 A316591 A316592 KEYWORD nonn AUTHOR Pierandrea Formusa, Jul 07 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 21 14:54 EDT 2020. Contains 337272 sequences. (Running on oeis4.)