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.

Showing 1-2 of 2 results.

A222563 Primes p such that the sum of divisors (excluding 1 and p - 1) of p - 1 and the sum of divisors (excluding 1 and p + 1) of p + 1 are both prime.

Original entry on oeis.org

5, 59, 83, 239, 281, 359, 443, 479, 521, 599, 761, 839, 1163, 1319, 1361, 1583, 1619, 1721, 1787, 1871, 1877, 2003, 2063, 2339, 2927, 2969, 3251, 3371, 3407, 3671, 3767, 3917, 4001, 4013, 4229, 4283, 4397, 4451, 4463, 4649, 4679, 5147, 5261, 6287, 6329, 6659, 6689
Offset: 1

Views

Author

Gerasimov Sergey, Feb 25 2013

Keywords

Examples

			83 is in the sequence because: it is prime, the sum of divisors (excluding 1 and 82) of 82 is 2 + 41 = 43, which is prime, and the sum of divisors (excluding 1 and 84) of 84 is 2 + 3 + 4 + 6 + 7 + 12 + 14 + 21 + 28 + 42 = 139, which is also prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2,900]],AllTrue[{Total[Most[Rest[Divisors[#-1]]]], Total[ Most[Rest[Divisors[#+1]]]]},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 29 2016 *)
  • PARI
    is(n)=isprime(n)&&isprime(sigma(n-1)-n)&&isprime(sigma(n+1)-n-2) \\ Charles R Greathouse IV, Feb 25 2013

Extensions

Extended and a(4) and a(6) inserted by Charles R Greathouse IV, Feb 25 2013

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
    
Showing 1-2 of 2 results.