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

A235796 2*n - 1 - sigma(n).

Original entry on oeis.org

0, 0, 1, 0, 3, -1, 5, 0, 4, 1, 9, -5, 11, 3, 5, 0, 15, -4, 17, -3, 9, 7, 21, -13, 18, 9, 13, -1, 27, -13, 29, 0, 17, 13, 21, -20, 35, 15, 21, -11, 39, -13, 41, 3, 11, 19, 45, -29, 40, 6, 29, 5, 51, -13, 37, -9, 33, 25, 57, -49, 59, 27, 21, 0, 45, -13, 65, 9, 41
Offset: 1

Views

Author

Omar E. Pol, Jan 25 2014

Keywords

Comments

Partial sums give A004125.
Also 0 together with A120444.
It appears that a(n) = 0 iff n is a power of 2.
Numbers n with a(n) = 0 are called "almost perfect", "least deficient" or "slightly defective" numbers. See A000079. - Robert Israel, Jul 22 2014
a(n) = n - 2 iff n is prime.
a(n) = -1 iff n is a perfect number.
Also the alternating row sums of A239446. - Omar E. Pol, Jul 21 2014

Examples

			.     The positive     The sum of
n     odd numbers     divisors of n.      a(n)
1          1                1               0
2          3                3               0
3          5                4               1
4          7                7               0
5          9                6               3
6         11               12              -1
7         13                8               5
8         15               15               0
9         17               13               4
10        19               18               1
...
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, New York, 2004.

Crossrefs

Programs

  • Magma
    [2*n-1-SumOfDivisors(n): n in [1..100]]; // Vincenzo Librandi, Feb 25 2014
  • Mathematica
    Table[2n-1-DivisorSigma[1,n],{n,70}] (* Harvey P. Dale, Jul 11 2014 *)
  • PARI
    vector(100, n, (2*n-1)-sigma(n)) \\ Colin Barker, Jan 27 2014
    

Formula

a(n) = A005408(n-1) - A000203(n).
a(n) = -1 - A033880(n). - Michel Marcus, Jan 27 2014
a(n) = n - 1 - A001065(n). - Omar E. Pol, Jan 29 2014
a(n) = A033879(n) - 1. - Omar E. Pol, Jan 30 2014
a(n) = 2*n - 2 - A039653(n). - Omar E. Pol, Jan 31 2014
a(n) = (-1)*A237588(n). - Omar E. Pol, Feb 23 2014
a(n) = 2*n - A088580(n). - Omar E. Pol, Mar 23 2014

A239446 Triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the elements of A004273 interleaved with k zeros, and the first element of column k is in row k*(k+1)/2.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 0, 5, 0, 0, 0, 0, 0, 7, 3, 0, 0, 0, 1, 0, 9, 0, 0, 0, 0, 5, 0, 0, 11, 0, 0, 0, 0, 0, 3, 0, 13, 7, 0, 1, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 9, 5, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 3, 0, 19, 11, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 21, 0
Offset: 1

Views

Author

Omar E. Pol, Mar 20 2014

Keywords

Comments

Alternating sum of row n equals A235796(n), i.e., sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A235796(n).
Row n has length A003056(n) hence column k starts in row A000217(k).
Column k starts with k+1 zeros and then lists the odd numbers interleaved with k zeros.
It appears that row n lists all zeros iff n is a power of 2.

Examples

			Triangle begins:
0;
0;
1,  0;
0,  0;
3,  0;
0,  1,  0;
5,  0,  0;
0,  0,  0;
7,  3,  0;
0,  0,  1,  0;
9,  0,  0,  0;
0,  5,  0,  0;
11, 0,  0,  0;
0,  0,  3,  0;
13, 7,  0,  1,  0;
0,  0,  0,  0,  0;
15, 0,  0,  0,  0;
0,  9,  5,  0,  0;
17, 0,  0,  0,  0;
0,  0,  0,  3,  0;
19, 11, 0,  0,  1,  0;
0,  0,  7,  0,  0,  0;
21, 0,  0,  0,  0,  0;
0,  13, 0,  0,  0,  0;
23, 0,  0,  5,  0,  0;
...
For n = 15 the 15th row of triangle is 13, 7, 0, 1, and the alternating sum is 13 - 7 + 0 - 1 = A235796(15) = 5.
		

Crossrefs

A352337 Numbers m such that A_m(j) = 1 for some value of j, where A_m(k+1) = 2*A_m(k) - sigma(A_m(k)), sigma(m) = sum of the divisors of m, and A_m(1) = m.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 10, 11, 14, 16, 17, 21, 22, 23, 26, 27, 32, 34, 35, 38, 39, 44, 55, 57, 58, 59, 63, 64, 68, 74, 75, 77, 82, 83, 92, 93, 94, 110, 116, 119, 122, 125, 128, 129, 130, 131, 134, 136, 137, 142, 145, 152, 161, 164, 170, 171, 184, 185, 189, 194
Offset: 1

Views

Author

Simon Wundling, Mar 13 2022

Keywords

Comments

If m is deficient, then 2m > sigma(m) (see A005100) and the deficiency of m is defined as 2m - sigma(m) (see A033879). Now you can check if the deficiency is also deficient and generalize this with A_m(k+1) = 2*A_m(k) - sigma(A_m(k)) and A_m(1) = m. If A_m(j) = 1 for some value of j, then m is in this sequence.
This sequence is a subsequence of A005100 (deficient numbers), because if m is abundant or perfect (see A005101 and A000396) then A_m(2) = 2*m - sigma(m) <= 0 instantly.
Since it is conjectured that 2m - sigma(m) = 1 only for m which are powers of two (see comments at A237588) all numbers in this sequence must have one k for which A_m(k) is a power of two.
Because of 2*2^k - sigma(2^k) = 1 all powers of two are in this sequence and with that this sequence has infinitely many terms. Further all Fermat primes (see A019434) are also in this sequence.

Examples

			11 is in this sequence because A_11(1) = 11, A_11(2) = 2*11-(1+11) = 10, A_11(3) = 2*10-(1+2+5+10) = 2, A_11(4) = 2*2-(2+1) = 1.
		

Crossrefs

Subsequence of A005100.

Programs

  • PARI
    f(n) = 2*n - sigma(n);
    isok(m) = while (1, m = f(m); if (m==1, return(1)); if (m<=0, return(0));); \\ Michel Marcus, Mar 13 2022
Showing 1-3 of 3 results.