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!)
A306490 Numbers k such that sigma(k) - k - 2 is prime. 1
8, 9, 15, 16, 18, 27, 32, 33, 35, 36, 45, 50, 51, 64, 65, 75, 77, 87, 91, 95, 98, 119, 123, 125, 135, 143, 144, 147, 153, 161, 162, 175, 177, 185, 195, 200, 207, 209, 213, 215, 217, 221, 231, 247, 259, 261, 273, 285, 287, 297, 303, 315, 321 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Maple and Mathematica programs adapted from A085842.
LINKS
EXAMPLE
The divisors of 8 are {1, 2, 4, 8}. sigma(8) - 8 - 2 = 5, which is prime.
MAPLE
with(numtheory): b := []: for n from 3 to 2000 do t1 := divisors(n); t2 := convert(t1, list); t3 := add(t2[i], i=1..nops(t2)); if isprime(t3-2-n) then b := [op(b), n]; fi; od: b;
MATHEMATICA
f[n_]:=Plus@@Divisors[n]-n-2; lst={}; Do[a=f[n]; If[PrimeQ[a], AppendTo[lst, n]], {n, 7!}]; lst
Select[Range[2, 500], PrimeQ[DivisorSigma[1, #] - # - 2] &] (* Vaclav Kotesovec, Feb 23 2019 *)
PROG
(PARI) isok(n) = isprime(sigma(n) - n - 2); \\ Michel Marcus, Feb 23 2019
(GAP) Filtered([2..330], k->IsPrime(Sigma(k)-k-2)); # Muniru A Asiru, Feb 24 2019
CROSSREFS
Sequence in context: A257037 A114305 A101765 * A256351 A050688 A134334
KEYWORD
nonn,easy
AUTHOR
Jan Koornstra, Feb 19 2019
STATUS
approved

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 August 21 17:59 EDT 2024. Contains 375353 sequences. (Running on oeis4.)