%I #16 Sep 08 2022 08:46:13
%S 2,6,11,19,33,35,37,47,57,68,79,81,82,88,118,121,129,145,157,162,179,
%T 217,226,241,245,257,258,260,262,289,306,332,378,393,430,434,441,461,
%U 465,466,473,474,477,483,485,490,499,504,509,512,518,526,528,533,550
%N Numbers n such that 1 - sigma(n) + sigma(n)^2 - sigma(n)^3 + sigma(n)^4 is prime.
%H Robert Price, <a href="/A259411/b259411.txt">Table of n, a(n) for n = 1..1017</a>
%H OEIS Wiki, <a href="https://oeis.org/wiki/Cyclotomic Polynomials at x=n, n! and sigma(n)">Cyclotomic Polynomials at x=n, n! and sigma(n)</a>
%p with(numtheory): A259411:=n->`if`(isprime(1-sigma(n)+sigma(n)^2-sigma(n)^3+sigma(n)^4), n, NULL): seq(A259411(n), n=1..1000); # _Wesley Ivan Hurt_, Jul 09 2015
%t Select[ Range[10000], PrimeQ[ 1 - DivisorSigma[1, #] + DivisorSigma[1, #]^2 - DivisorSigma[1, #]^3 + DivisorSigma[1, #]^4] & ]
%t Select[ Range[10000], PrimeQ[ Cyclotomic[10, DivisorSigma[1, #]]] &]
%o (Magma) [n: n in [1..600] | IsPrime(1 - DivisorSigma(1, n) + DivisorSigma(1, n)^2 - DivisorSigma(1, n)^3 + DivisorSigma(1, n)^4)]; // _Vincenzo Librandi_, Jun 27 2015
%o (PARI) is(n)=my(s=sigma(n)); isprime(s^4-s^3+s^2-s+1) \\ _Charles R Greathouse IV_, May 22 2017
%Y Cf. A000203, A259410, A259412.
%K easy,nonn
%O 1,1
%A _Robert Price_, Jun 26 2015