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.

A088005 Numbers whose abundance is (+-1) times a prime.

Original entry on oeis.org

3, 9, 10, 18, 20, 25, 36, 49, 50, 81, 100, 104, 121, 136, 196, 225, 289, 324, 338, 392, 464, 484, 576, 650, 676, 784, 800, 841, 900, 961, 968, 1058, 1089, 1156, 1225, 1250, 1352, 1682, 1936, 1952, 2209, 2312, 2450, 2500, 2888, 3136, 3364, 3721, 4225, 4356
Offset: 1

Views

Author

Labos Elemer, Oct 18 2003

Keywords

Examples

			n=18: sigma[18]=18+9+6+3+2+1=39, 2n=36, abundance=3, a prime;
n=25: sigma[25]=25+5+1=31, 2n=50, abundance=-19.
		

Crossrefs

Programs

  • Mathematica
    ab[x_] := DivisorSigma[1, x]-2*x Do[If[PrimeQ[s=ab[n]], Print[{n, s}]], {n, 1, 10000}]
  • PARI
    isok(n) = isprime(abs(sigma(n)-2*n)); \\ Michel Marcus, Sep 21 2019

Formula

abs(sigma(n)-2n) is a prime.