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.

A152770 Sum of proper divisors minus the number of proper divisors of n: a(n) = sigma(n) - n - d(n) + 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 3, 0, 4, 2, 5, 0, 11, 0, 7, 6, 11, 0, 16, 0, 17, 8, 11, 0, 29, 4, 13, 10, 23, 0, 35, 0, 26, 12, 17, 10, 47, 0, 19, 14, 43, 0, 47, 0, 35, 28, 23, 0, 67, 6, 38, 18, 41, 0, 59, 14, 57, 20, 29, 0, 97, 0, 31, 36, 57, 16, 71, 0, 53, 24, 67, 0, 112, 0, 37, 44, 59, 16, 83, 0, 97
Offset: 1

Views

Author

Omar E. Pol, Dec 12 2008

Keywords

Comments

Sum of divisors of n, minus the number of divisors of n, minus n, plus 1.
Also, sum of proper divisors of n, minus the number of divisors of n, plus 1.
Note that if a(n)>0 then n is a composite number (A002808), otherwise, n is a noncomposite number (A008578) also called prime number at the beginning of the 20th century.
Also, sum of divisors of n, minus the number of proper divisors of n, minus n.
a(A008578(n)) = 0 for all n>=1. - Robert G. Wilson v, Dec 14 2008

Crossrefs

Programs

  • Maple
    A152770 := proc(n)
            numtheory[sigma](n)-n-numtheory[tau](n)+1 ;
    end proc: # R. J. Mathar, Sep 28 2011
  • Mathematica
    f[n_] := DivisorSigma[1, n] - DivisorSigma[0, n] - n + 1; Array[f, 105] (* Robert G. Wilson v, Dec 14 2008 *)
  • PARI
    a(n)=sigma(n)-n-numdiv(n)+1 \\ Charles R Greathouse IV, Mar 09 2014

Formula

a(n) = A000203(n) - A000005(n) - n + 1 = A001065(n) - A000005(n) + 1 = A000203(n) - A062249(n) + 1 = A065608(n) - n + 1.
a(n) = A000203(n) - A032741(n) - n.
a(n) = A001065(n) - A032741(n).
a(n) = A158901(n) - n. - Juri-Stepan Gerasimov, Sep 12 2009
From Peter Bala Jan 22 2021: (Start)
G.f.: A(q) = Sum_{n >= 2} (n-1)*q^(2*n)/(1 - q^n) = Sum_{n >= 2} q^(2*n)/(1 - q^n)^2. Cf. A001065.
Faster converging series: A(q) = Sum_{n >= 1} q^(n*(n+1))*((n-1)*q^(3*n+2) - n*q^(2*n+1) + (2-n)*q^(n+1) + n - 1)/((1 - q^n)*(1 - q^(n+1))^2) - apply the operator t*d/dt to equation 1 in Arndt, then set t = q^2 and x = q. (End)

Extensions

More terms from Omar E. Pol and Robert G. Wilson v, Dec 14 2008
Definition clarified and edited by Omar E. Pol, Dec 21 2008

A158902 Triangle read by rows: the matrix product A051731 * A158821.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 5, 1, 0, 1, 5, 0, 0, 0, 1, 9, 1, 1, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 12, 1, 0, 1, 0, 0, 0, 1, 11, 0, 1, 0, 0, 0, 0, 0, 1, 15, 1, 0, 0, 1, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 23, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gary W. Adamson and Mats Granvik, Mar 29 2009

Keywords

Examples

			First few rows of the triangle =
1;
2, 1;
3, 0, 1;
5, 1, 0, 1;
5, 0, 0, 0, 1;
9, 1, 1, 0, 0, 1;
7, 0, 0, 0, 0, 0, 1;
12, 1, 0, 1, 0, 0, 0, 1
11, 0, 1, 0, 0, 0, 0, 0, 1;
15, 1, 0, 0, 1, 0, 0, 0, 0, 1;
11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
23, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1;
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1;
...
		

Crossrefs

Cf. A158821, A051731, A158901, A000203 (row sums).

Programs

  • Maple
    A158902 := proc(n,k)
        add( A051731(n,j)*A158821(j-1,k-1),j=k..n) ;
    end proc:
    seq(seq(A158902(n,k),k=1..n),n=1..12) ; # R. J. Mathar, Jan 08 2015
  • Mathematica
    m = 12; (* number of rows *)
    T1[n_, k_] := Boole[Mod[n, k] == 0];
    T2[n_, k_] := Which[n == k, 1, k == 1, n-1, True, 0];
    T = Array[T1, {m, m}].Array[T2, {m, m}];
    Table[T[[n, k]], {n, m}, {k, n}] // Flatten (* Jean-François Alcover, Feb 01 2023 *)

Formula

T(n,n) = 1.
T(n,1) = A158901(n).

Extensions

Wrong A-number in definition corrected by Robert Israel, Jan 08 2015
Showing 1-2 of 2 results.