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.

A306490 Numbers k such that sigma(k) - k - 2 is prime.

Original entry on oeis.org

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
Offset: 1

Views

Author

Jan Koornstra, Feb 19 2019

Keywords

Comments

Maple and Mathematica programs adapted from A085842.

Examples

			The divisors of 8 are {1, 2, 4, 8}. sigma(8) - 8 - 2 = 5, which is prime.
		

Crossrefs

Programs

  • GAP
    Filtered([2..330],k->IsPrime(Sigma(k)-k-2)); # Muniru A Asiru, Feb 24 2019
  • 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 *)
  • PARI
    isok(n) = isprime(sigma(n) - n - 2); \\ Michel Marcus, Feb 23 2019