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.

Showing 1-3 of 3 results.

A359131 Number of odd primes in the Collatz trajectory of A177000(n).

Original entry on oeis.org

0, 2, 1, 5, 4, 2, 3, 6, 5, 6, 2, 10, 8, 9, 7, 8, 6, 11, 9, 4, 7, 5, 8, 3, 9, 7, 4, 2, 3, 6, 9, 7, 10, 5, 8, 6, 11, 4, 2, 10, 3, 9, 10, 11, 12, 3, 6, 5, 11, 4, 10, 5, 3, 6, 7, 9, 7, 2, 7, 5, 8, 6, 4, 7, 5, 8, 3, 6, 9, 10, 5, 8, 3, 7, 8, 8, 13, 11, 11, 9, 12, 2
Offset: 1

Views

Author

N. J. A. Sloane, Dec 29 2022, following a suggestion from Rudolfo Nieves

Keywords

Comments

Equivalently, a(n) = A055509(A177000(n)).

Crossrefs

Extensions

a(38) and beyond from Michael S. Branicky, Dec 30 2022

A177330 Least k>0 such that (p*2^k-1)/3 is prime, or zero if no k exists, where p=prime(n).

Original entry on oeis.org

3, 0, 1, 4, 1, 2, 1, 4, 3, 1, 2, 4, 3, 4, 1, 9107, 3, 6, 2, 1, 2, 4, 7, 1, 6, 1, 2, 1, 32, 11, 4, 3, 45, 24, 3, 6, 8, 16, 21, 3, 29, 2, 1, 2, 1, 4, 2, 66, 1, 8, 7, 5, 10, 1, 5, 3, 1, 14, 18, 13, 6, 59, 2, 3, 4, 1, 18, 2, 5, 4, 3, 1, 6, 5016, 8, 3, 15, 14, 3, 12, 3, 46, 5, 2, 4, 3, 5, 4, 1, 2, 1, 3
Offset: 1

Views

Author

T. D. Noe, May 08 2010

Keywords

Comments

When a(n) is not zero, a(n) is even if p=1 (mod 6); a(n) is odd if p=5 (mod 6). If we let q=(p*2^k-1)/3 be a prime generated by p for some k>0, then the first prime number after q in the Collatz iteration of q is p. When k=1, q is less than p. The primes, other than 3, for which a(n)=0 are in A177331.

Crossrefs

Programs

  • Mathematica
    Table[p=Prime[n]; If[p==3, k=0, k=1; While[q=(p*2^k-1)/3; k<10000 && !PrimeQ[q], k++ ]]; k, {n,100}]

A216189 Numbers n whose odd Collatz steps (except for 1) are all primes.

Original entry on oeis.org

3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 17, 19, 20, 21, 22, 24, 25, 26, 28, 29, 34, 35, 37, 38, 39, 40, 44, 45, 48, 49, 52, 53, 56, 58, 59, 67, 68, 69, 74, 76, 77, 80, 85, 87, 88, 89, 96, 99, 101, 104, 106, 112, 116, 117, 118, 119, 131, 134, 136, 141, 148, 149
Offset: 1

Views

Author

Alessandro Polcini, Oct 10 2018

Keywords

Comments

Powers of 2 are not included as they don't have odd Collatz steps. The number n itself (if odd) is not counted as an odd step. [Corrected by Jianing Song, Dec 09 2018]

Examples

			7 is in this sequence because 7*3+1 = 22; 22/2 = [11]; 11*3+1 = 34; 34/2 = [17]; 17*3+1 = 52; 52/2 = 26; 26/2 = [13]; 13*3+1 = 40; 40/2 = 20; 20/2 = 10; 10/2 = [5]; 5*3+1 = 16; 16/2 = 8; 8/2 = 4; 4/2 = 2; 2/2 = 1. 11, 17, 13 and 5 are all primes.
15 is not in this sequence because 15*3+1 = 46; 46/2 = [23]; 23*3+1 = 70; 70/2 = 35, which isn't a prime number.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[3, 150], And[AllTrue[Select[Rest@ #2, OddQ], PrimeQ], !IntegerQ@ Log2@ #1] & @@ {#, NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, #, # > 2 &, 1, Infinity, -1]} &] (* Michael De Vlieger, Nov 07 2018 *)
Showing 1-3 of 3 results.