[go: up one dir, main page]

login
A058770
Numbers k such that k * (1+i)^k + 1 is a Gaussian prime.
0
1, 2, 3, 5, 9, 19, 20, 29, 30, 68, 142, 143, 150, 159, 198, 468, 782, 858, 1100, 1137, 3337, 3638, 3909, 4845, 16895, 30349, 42692, 48470
OFFSET
1,2
MAPLE
select(n -> GaussInt:-GIprime(n*(1+I)^n+1), [$1..50000]); # Robert Israel, May 08 2023
MATHEMATICA
Do[ If[ PrimeQ[ n * (1 + I)^n + 1, GaussianIntegers -> True], Print[n] ], {n, 1, 4000} ]
PROG
(Python)
from itertools import count, islice
from sympy import I
from sympy.ntheory import is_gaussian_prime
def A058770_gen(startvalue=1): # generator of terms
x = (1+I)**(m:=max(startvalue, 1))
for k in count(m):
if is_gaussian_prime(k*x+1):
yield k
x *= (1+I)
A058770_list = list(islice(A058770_gen(), 20)) # Chai Wah Wu, May 09 2023
CROSSREFS
Sequence in context: A051236 A003218 A119002 * A049910 A077643 A123389
KEYWORD
nonn,hard,more
AUTHOR
Robert G. Wilson v, Jan 02 2001
EXTENSIONS
Corrected by Robert Israel, May 08 2023
STATUS
approved