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.

A349667 Primes of the form 4*k+1 which are a prime after the Collatz step *3+1 and a maximal reduction by 2.

Original entry on oeis.org

13, 17, 29, 37, 41, 53, 61, 89, 97, 101, 109, 137, 149, 157, 181, 197, 229, 241, 257, 269, 277, 281, 349, 389, 397, 409, 421, 449, 461, 509, 577, 617, 661, 677, 701, 757, 761, 769, 809, 829, 853, 857, 881, 941, 977, 1009, 1021, 1049, 1061, 1069, 1097, 1109, 1117, 1181
Offset: 1

Views

Author

Karl-Heinz Hofmann, Dec 28 2021

Keywords

Comments

Pythagorean primes (A002144) of the form 4*k+1 have, after the Collatz step *3+1, at least 2 or more factors 2. (See also A349666).

Examples

			a(41) = 853; 853*3+1 = 2560; then dividing 9 times by 2 = 5, a prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := n/2^IntegerExponent[n, 2]; q[n_] := PrimeQ[n] && PrimeQ[f[3*n + 1]]; Select[4 * Range[300] + 1, q] (* Amiram Eldar, Jan 03 2022 *)
  • Python
    from sympy import isprime
    for p in range(1,10000,4):
        if isprime(p):
            p2 = (3 * p + 1)
            while p2 % 2 == 0: p2 //= 2
            if isprime(p2): print(p, end=", ")