cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A249485 Numbers n such that sigma(n) - 2 is prime.

Original entry on oeis.org

3, 4, 8, 9, 16, 18, 25, 32, 36, 72, 121, 144, 169, 196, 200, 225, 242, 256, 338, 361, 392, 441, 484, 512, 578, 676, 729, 800, 882, 900, 961, 968, 1058, 1152, 1250, 1521, 1681, 1800, 2048, 2312, 2592, 2601, 2738, 2809, 2916, 3136, 3249, 3362, 3481, 3528, 3600
Offset: 1

Views

Author

Jaroslav Krizek, Nov 13 2014

Keywords

Comments

The only prime term is 3.
a(n) is a square or twice a square for n > 1. If a(n) is odd and n > 1, then a(n) must be a square. - Altug Alkan, Jul 16 2016

Examples

			Number 8 is in the sequence because sigma(8)-2 = 15-2 = 13 (prime).
		

Crossrefs

Programs

  • Magma
    [n: n in[1..100000] | IsPrime(SumOfDivisors(n)- 2)]
    
  • Mathematica
    Select[Range[4000], PrimeQ[DivisorSigma[1, #] - 2] &] (* Vincenzo Librandi, Nov 14 2014 *)
  • PARI
    for(n=1,10000,if(isprime(sigma(n)-2),print1(n,", "))) \\ Derek Orr, Nov 13 2014
    
  • PARI
    list(lim)=my(v=List([3]),t); for(n=2,sqrtint(lim\1), if(isprime(sigma(t=n^2)-2), listput(v,t))); for(n=2,sqrtint(lim\2), if(isprime(sigma(t=2*n^2)-2), listput(v,t))); Set(v) \\ Charles R Greathouse IV, Jul 16 2016