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!)
A249485 Numbers n such that sigma(n) - 2 is prime. 2

%I #23 Sep 08 2022 08:46:10

%S 3,4,8,9,16,18,25,32,36,72,121,144,169,196,200,225,242,256,338,361,

%T 392,441,484,512,578,676,729,800,882,900,961,968,1058,1152,1250,1521,

%U 1681,1800,2048,2312,2592,2601,2738,2809,2916,3136,3249,3362,3481,3528,3600

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

%C The only prime term is 3.

%C 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

%H Charles R Greathouse IV, <a href="/A249485/b249485.txt">Table of n, a(n) for n = 1..10000</a>

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

%t Select[Range[4000], PrimeQ[DivisorSigma[1, #] - 2] &] (* _Vincenzo Librandi_, Nov 14 2014 *)

%o (Magma) [n: n in[1..100000] | IsPrime(SumOfDivisors(n)- 2)]

%o (PARI) for(n=1,10000,if(isprime(sigma(n)-2),print1(n,", "))) \\ _Derek Orr_, Nov 13 2014

%o (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

%Y Cf. A000040, A000203.

%K nonn,easy

%O 1,1

%A _Jaroslav Krizek_, Nov 13 2014

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 27 10:37 EDT 2024. Contains 372017 sequences. (Running on oeis4.)