login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A289776 Least k such that the sum of the first n divisors of k is a prime number. 5
2, 4, 30, 16, 84, 36, 60, 144, 144, 144, 144, 210, 324, 360, 630, 756, 756, 576, 660, 840, 840, 2040, 900, 900, 2304, 1980, 1980, 1980, 4320, 5184, 3300, 4620, 5460, 7056, 3960, 4680, 2520, 3600, 3600, 3600, 10080, 8100, 3600, 6300, 9900, 7920, 11088, 14400 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

COMMENTS

The corresponding primes are 3, 7, 11, 31, 23, 37, 43, 61, 79, 103, 139, 191, 523, 167, 263, 347, 431, 787, 641, ...

The squares in the sequence are 4, 16, 36, 144, 324, 576, 900, 2304, 3600, 5184, 7056, 8100, 14400, ...

LINKS

Chai Wah Wu, Table of n, a(n) for n = 2..1000

EXAMPLE

a(4)=30 because the sum of the first 4 divisors of 30 is 1 + 2 + 3 + 5 = 11, which is prime, and there is no integer below 30 with this property.

MAPLE

with(numtheory):nn:=10^6:

for n from 2 to 50 do:

ii:=0:

   for k from 2 to nn while(ii=0) do:

     x:=divisors(k):n0:=nops(x):

       for l from 1 to n0 while(ii=0) do:

        p:=sum('x[i]', 'i'=1..l):

        if type(p, prime)=true and l=n

         then

         ii:=1:printf (`%d %d \n`, n, k):

         else fi:

        od:

      od:

  od:

MATHEMATICA

Table[k = 1; While[Nand[Length@ # >= n, PrimeQ@ Total@ Take[PadRight[#, n], n]] &@ Divisors@ k, k++]; k, {n, 2, 49}] (* Michael De Vlieger, Jul 12 2017 *)

PROG

(PARI) a(n) = k=1; while((d=divisors(k)) && ((#d<n) || !isprime(sum(j=1, n, d[j]))), k++); k; \\ Michel Marcus, Jul 12 2017

(Python)

from sympy import divisors, isprime

def A289776(n):

    i = 1

    while len(divisors(i)) < n or not isprime(sum(divisors(i)[:n])):

        i += 1

    return i # Chai Wah Wu, Aug 05 2017

CROSSREFS

Cf. A000040, A027750, A240698.

Sequence in context: A081464 A216026 A241589 * A290169 A232173 A067195

Adjacent sequences:  A289773 A289774 A289775 * A289777 A289778 A289779

KEYWORD

nonn

AUTHOR

Michel Lagneau, Jul 12 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 17 18:14 EST 2020. Contains 330987 sequences. (Running on oeis4.)