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-4 of 4 results.

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.

A088006 Abundance values of numbers whose abundance is (+-1) times a prime.

Original entry on oeis.org

-2, -5, -2, 3, 2, -19, 19, -41, -7, -41, 17, 2, -109, -2, 7, -47, -271, 199, -127, 71, 2, -37, 499, 2, -71, 199, 353, -811, 1021, -929, 59, -457, -449, -163, -683, -157, 41, -751, 251, 2, -2161, -19, 401, 467, -61, 967, -631, -3659, -2777, 3391, -4421, 269, -2333, -1201, -4969, 4999, -1103, -2647, -1097, 269
Offset: 1

Views

Author

Labos Elemer, Oct 18 2003

Keywords

Examples

			For n = 4: A088005(4) = 18, sigma(18) = 18 + 9 + 6 + 3 + 2 + 1 = 39, 2*18 = 36, abundance = 39 - 36 = 3 = a(4).
For n = 6: A088005(6) = 25, sigma(25)_= 25 + 5 + 1 = 31, 2*25 = 50, abundance = 31 - 50 = -19 = a(6).
		

Crossrefs

Programs

  • Mathematica
    ab[x_] := DivisorSigma[1, x]-2*x Do[If[PrimeQ[s=ab[n]], Print[s]], {n, 1, 10000}]
    Select[Table[DivisorSigma[1,n]-2n,{n,7000}],PrimeQ[Abs[#]]&] (* Harvey P. Dale, Aug 21 2011 *)
  • PARI
    list(lim) = {my(ab); for(k = 1, lim, ab = sigma(k) - 2*k; if(isprime(abs(ab)), print1(ab, ", ")));} \\ Amiram Eldar, Feb 16 2025

Formula

Solutions x to sigma(k) - 2k = x where abs(x) is a prime number.
a(n) = A033880(A088005(n)). - Amiram Eldar, Feb 16 2025

A217769 Least number k > n such that sigma(k) = 2*(k-n), or 0 if no such k exists.

Original entry on oeis.org

6, 3, 5, 7, 22, 11, 13, 27, 17, 19, 46, 23, 124, 58, 29, 31, 250, 57, 37, 55, 41, 43, 94, 47, 1264, 106, 53, 87, 118, 59, 61, 85, 134, 67, 142, 71, 73, 712, 158, 79, 166, 83, 405, 115, 89, 141, 406, 119, 97, 202, 101, 103, 214, 107, 109, 145, 113, 177, 418, 143
Offset: 0

Views

Author

Jayanta Basu, Mar 28 2013

Keywords

Comments

a(0) = 6 corresponds to the smallest perfect number.
Is n = 144 the first number for which a(n) = 0? - T. D. Noe, Mar 28 2013
No, a(144) = 95501968. - Giovanni Resta, Mar 28 2013
We can instead compute k - sigma(k)/2 for increasing k, which is computationally much faster. In this case, we stop computing when all n have been found for a range of numbers. - T. D. Noe, Mar 28 2013
Also, the first number whose deficiency is 2n. This is the even bisection of A082730. Hence, the first number in the following sequences: A000396, A191363, A125246, A141548, A125247, A101223, A141549, A141550, A125248, A223608, A223607, A223606. - T. D. Noe, Mar 29 2013
10^12 < a(654) <= 618970019665683124609613824. - Donovan Johnson, Jan 04 2014

Examples

			a(4)=22, since 22 is the least number such that sigma(22)=36=2*(22-4).
		

Crossrefs

Cf. A087998 (negative n).

Programs

  • Mathematica
    Table[Min[Select[Range[2000], DivisorSigma[1, #] == 2*(# - i) &]], {i, 0, 60}]
    nn = 144; t = Table[0, {nn}]; k = 0; While[k++; Times @@ t == 0, s = (2*k - DivisorSigma[1, k])/2; If[s >= 0 && s < nn && IntegerQ[s] && t[[s + 1]] == 0, t[[s + 1]] = k]]; t (* T. D. Noe, Mar 28 2013 *)

A124109 Numbers whose abundance (A033880) or deficiency (A033879) is a semiprime number.

Original entry on oeis.org

5, 7, 11, 12, 14, 15, 21, 23, 26, 27, 34, 35, 39, 40, 44, 47, 52, 55, 57, 58, 59, 63, 65, 68, 70, 72, 74, 75, 77, 80, 82, 83, 85, 88, 93, 98, 107, 110, 115, 116, 119, 122, 125, 129, 133, 143, 144, 152, 155, 160, 162, 164, 167, 169, 171, 178, 179, 183, 185, 187, 189
Offset: 1

Views

Author

Jonathan Vos Post, Nov 26 2006

Keywords

Comments

If p is prime, then the only divisors of p are 1 and p, so sigma(p) = p + 1 and abundance(p) = abs(sigma(p) - 2*p) = abs((p+1) - 2*p) = abs(1-p) = p-1. Hence this sequence includes all values of the sequence of the primes which are one more than semiprimes. This is identical to A005385 Safe primes p: (p-1)/2 is also prime [then (p-1)/2 is called a Sophie Germain prime: see A005384] since as Zak Seidov commented, this is identical to primes p such that p-1 is a semiprime]. But the current sequence also contains composites, such as a(4) = 12, a(5) = 14, a(6) = 15 and a(7) = 21. If k = p*q is a semiprime (with p and q distinct primes) then the only divisors of k are 1, p, q and p*q, so sigma(k) = 1 + p + q + p*q and abs(abundance(k)) = abs(1 + p + q + p*q - p*q) = abs(1 + p + q) and these are in the sequence if 1 + p + q is semiprime. Note that numbers can be in the sequence which are neither prime nor semiprime, starting with a(4) = 12 and a(10) = 27.

Examples

			a(1) = 5 because abs(sigma(5) - 2*5) = abs(6-10) = abs(-4) = 4 = 2^2 is semiprime.
a(2) = 7 because abs(sigma(7) - 2*7) = abs(8-14) = abs(-6) = 6 = 2 * 3 is semiprime.
a(3) = 11 because abs(sigma(11) - 2*11) = abs(12-22) = abs(-10) = 10 = 2 * 5 is semiprime.
a(4) = 12 because abs(sigma(12) - 2*12) = abs(28-24) = abs(-4) = 4 = 2^2 is semiprime.
a(5) = 14 because abs(sigma(14) - 2*14) = abs(24-28) = abs(+4) = 4 = 2^2 is semiprime.
a(6) = 15 because abs(sigma(15) - 2*15) = abs(24-30) = abs(-6) = 6 = 2 * 3 is semiprime.
a(7) = 21 because abs(sigma(21) - 2*21) = abs(32-42) = abs(-10) = 10 = 2 * 5 is semiprime.
a(8) = 23 because abs(sigma(23) - 2*23) = abs(24-46) = abs(-22) = 22 = 2 * 11 is semiprime.
		

Crossrefs

Programs

  • Mathematica
    semiPrimeQ[n_] := Plus @@ Last /@ FactorInteger@n == 2; Select[ Range@ 193, semiPrimeQ@Abs[DivisorSigma[1, # ] - 2# ] &] (* Robert G. Wilson v *)

Formula

Abs[sigma(a(n)) - 2*a(n)] is a semiprime, where sigma(k) = sum of divisors of k. {Abs[sigma(a(n)) - 2*a(n)]} is in A001358.

Extensions

More terms from Robert G. Wilson v, Nov 29 2006
Showing 1-4 of 4 results.