login
A290817
Primes of at least one of the forms p^2 +- p +- 1, where p is prime.
1
3, 5, 7, 11, 13, 19, 29, 31, 41, 43, 109, 131, 157, 181, 271, 307, 379, 811, 929, 991, 1721, 1723, 2161, 2861, 3539, 3541, 3659, 4421, 4423, 4969, 5113, 6163, 6971, 8009, 8011, 9311, 10099, 10301, 10303, 10711, 16001, 17029, 17291, 17293, 19181, 19183, 22051, 22349, 22651
OFFSET
1,1
COMMENTS
This sequence contains prime chains and prime trees using an appropriate mapping form p^2 +- p +- 1 in each step, such as the chain: 3 -> 5 -> 19 -> 379 -> 143263 -> 20524143907 and the tree: 41 -> {1721, 1723}.
LINKS
MAPLE
select(isprime, [3, seq(op([p^2-p-1, p^2-p+1, p^2+p-1, p^2+p+1]), p=select(isprime, [seq(i, i=3..1000, 2)]))]); # Robert Israel, Nov 27 2019
MATHEMATICA
Select[Union[Flatten[{(#^2 + # + 1 ), (#^2 + # - 1 ), (#^2 - # + 1 ), (#^2 - # - 1 )}] &[Prime[Range[100]]]], (PrimeQ[#]) &]
PROG
(Magma) {p^2+(-1)^k*p+(-1)^s:p in PrimesUpTo(150), s, k in [1..2]|IsPrime(p^2+(-1)^k*p+(-1)^s)}; // Marius A. Burtea, Nov 28 2019
CROSSREFS
Cf. A000040.
Sequence in context: A154966 A072667 A092729 * A059353 A212375 A040993
KEYWORD
nonn
AUTHOR
Ralf Steiner, Aug 11 2017
STATUS
approved