login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A242389
2^n minus the sum of the proper divisors of n.
1
2, 3, 7, 13, 31, 58, 127, 249, 508, 1016, 2047, 4080, 8191, 16374, 32759, 65521, 131071, 262123, 524287, 1048554, 2097141, 4194290, 8388607, 16777180, 33554426, 67108848, 134217715, 268435428, 536870911, 1073741782, 2147483647, 4294967265, 8589934577
OFFSET
1,1
COMMENTS
The primes in the sequence are: 2, 3, 7, 13, 31, 127, 8191, 65521, 131071, 524287, 2147483647,... .
FORMULA
a(n) = A000079(n) - A001065(n).
EXAMPLE
For n = 4, 2^4 = 16, sum of proper divisors of n is 1 + 2 = 3, so a(4) = 16 - 3 = 13.
MAPLE
with(numtheory); A242389:=n->2^n+n-sigma(n); seq(A242389(n), n=1..50); # Wesley Ivan Hurt, May 13 2014
MATHEMATICA
Table[2^n + n - DivisorSigma[1, n], {n, 50}] (* Wesley Ivan Hurt, May 13 2014 *)
PROG
(Magma) [2^n + n - DivisorSigma(1, n): n in [1..30]];
(PARI) a(n) = 2^n + n - sigma(n); \\ Michel Marcus, May 13 2014
CROSSREFS
Sequence in context: A333313 A262829 A071899 * A102644 A014234 A124430
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, May 12 2014.
EXTENSIONS
a(30) corrected by Michel Marcus, Jun 14 2022
STATUS
approved