login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A259185 Numbers n such that 1 - sigma(n) + sigma(n)^2 is prime. 3

%I #18 Sep 08 2022 08:46:13

%S 2,3,4,5,8,9,10,12,17,18,20,24,26,30,32,36,38,40,41,45,46,51,54,55,56,

%T 58,59,60,66,70,71,72,78,86,87,89,91,92,94,95,99,101,102,104,106,108,

%U 110,115,116,119,123,125,131,134,138,142,143,144,154,159,164

%N Numbers n such that 1 - sigma(n) + sigma(n)^2 is prime.

%H Robert Price, <a href="/A259185/b259185.txt">Table of n, a(n) for n = 1..1737</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): A259185:=n->`if`(isprime(1 - sigma(n) + sigma(n)^2), n, NULL): seq(A259185(n), n=1..500); # _Wesley Ivan Hurt_, Jul 09 2015

%t Select[ Range[10000], PrimeQ[ 1 - DivisorSigma[1, n] + DivisorSigma[1, n]^2] & ]

%t Select[ Range[10000], PrimeQ[ Cyclotomic[6, DivisorSigma[1, #]]] &]

%o (Magma) [n: n in [1..180] | IsPrime(1 - SumOfDivisors(n) + SumOfDivisors(n)^2)]; // _Vincenzo Librandi_, Nov 20 2015

%o (PARI) is(n)=my(s=sigma(n)); isprime(s^2-s+1) \\ _Charles R Greathouse IV_, May 22 2017

%Y Cf. A000203, A259184, A259186.

%K nonn,easy

%O 1,1

%A _Robert Price_, Jun 20 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)