login
Primes of the form n^2*2^n + 1.
2

%I #31 Mar 26 2023 12:18:00

%S 3,17,73,257,924844033,966367641601,9354438770689,

%T 468230246058455728129,12676506002282294014967032053760001,

%U 112418056545792871256481555812420390351647277057,462428252436731001462884654101636424188009906177,32113073085884097323811434312613640568611799040001

%N Primes of the form n^2*2^n + 1.

%H Abhiram R Devesh, <a href="/A282400/b282400.txt">Table of n, a(n) for n = 1..15</a>

%t Select[Table[n^2 2^n+1,{n,200}],PrimeQ] (* _Harvey P. Dale_, Mar 26 2023 *)

%o (Python3)

%o import sympy

%o n = 1

%o while n < 100:

%o q = (n**2) * (2**n) + 1

%o if sympy.isprime(q):

%o print(q)

%o n += 1

%Y Subset of A248917

%Y Cf. A058780 Numbers n such that n^2 * 2^n + 1 is prime.

%Y Cf. A279904 Primes of the form n^2*2^n - 1.

%K nonn,easy

%O 1,1

%A _Abhiram R Devesh_, Feb 19 2017