A187822 Smallest k such that the partial sums of the divisors of k (taken in increasing order) contain exactly n primes.
1, 2, 4, 16, 64, 140, 440, 700, 1650, 2304, 5180, 3960, 3900, 14400, 15600, 43560, 39600, 57600, 56700, 81900, 25200, 112896, 100100, 177840, 198000, 411840, 222768, 226800, 637560, 752400, 556920, 907200, 409500, 565488, 1306800, 1984500, 1884960
Offset: 0
Keywords
Examples
a(4) = 64 because the partial sums of the divisors {1, 2, 4, 8, 16, 32, 64} that generate 4 prime numbers are: 1 + 2 = 3; 1 + 2 + 4 = 7; 1 + 2 + 4 + 8 + 16 = 31; 1 + 2 + 4 + 8 + 16 + 32 + 64 = 127.
Links
- Amiram Eldar, Table of n, a(n) for n = 0..126
Programs
-
Maple
read("transforms") : A187822 := proc(n) local k,ps,pct ; if n = 0 then return 1; end if; for k from 1 do ps := sort(convert(numtheory[divisors](k),list)) ; ps := PSUM(ps) ; pct := 0 ; for p in ps do if isprime(p) then pct := pct+1 ; end if; end do: if pct = n then return k ; end if; end do: end proc: # R. J. Mathar, Jan 18 2013
-
Mathematica
a[n_] := Catch[ For[k = 1, True, k++, cnt = Count[ Accumulate[ Divisors[k]], ?PrimeQ]; If[cnt == n, Print[{n, k}]; Throw[k]]]]; Table[a[n], {n, 0, 40}] (* _Jean-François Alcover, Dec 27 2012 *)
-
PARI
A187822(n)={n<1||for(k=1,9e9,numdiv(k)
M. F. Hasler, Dec 29 2012
Comments