login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes of the form p^4 + p^2 - 1 where p is prime.
1

%I #18 Aug 11 2024 15:31:28

%S 19,89,28729,130681,1875529,3420649,7893289,112561489,373320361,

%T 777824209,1506177289,3262865761,4362536449,5887416169,8882968249,

%U 9355048561,18141261409,21517809409,22898196361,27983100241,35152312609,62001747001,67123223641,85662460441,89526324889,100469663929

%N Primes of the form p^4 + p^2 - 1 where p is prime.

%C a(n) == 1 (mod 72) for n >= 3. - _Hugo Pfoertner_, Aug 29 2021

%H Robert Israel, <a href="/A347364/b347364.txt">Table of n, a(n) for n = 1..10000</a>

%e a(3) = 28729 is a term because 28729 = 13^4 + 13^2 - 1, and 13 and 28729 are primes.

%p map(t -> t^4+t^2-1, select(t -> isprime(t) and isprime(t^4+t^2-1), [2,seq(i,i=3..10000,2)]));

%t f[p_] := p^4 + p^2 - 1; Select[Map[f, Select[Range[600], PrimeQ]], PrimeQ] (* _Amiram Eldar_, Aug 29 2021 *)

%t Select[Table[p^4+p^2-1,{p,Prime[Range[200]]}],PrimeQ] (* _Harvey P. Dale_, Aug 11 2024 *)

%o (Python)

%o from sympy import isprime, primerange

%o def auptop(maxp): return list(filter(isprime, (p**4 + p**2 -1 for p in primerange(1, maxp+1))))

%o print(auptop(580)) # _Michael S. Branicky_, Aug 29 2021

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Aug 29 2021