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.

Previous Showing 31-40 of 41 results. Next

A236632 Sum of all divisors of all positive integers <= n minus the total number of divisors of all positive integers <= n.

Original entry on oeis.org

0, 1, 3, 7, 11, 19, 25, 36, 46, 60, 70, 92, 104, 124, 144, 170, 186, 219, 237, 273, 301, 333, 355, 407, 435, 473, 509, 559, 587, 651, 681, 738, 782, 832, 876, 958, 994, 1050, 1102, 1184, 1224, 1312, 1354, 1432, 1504, 1572, 1618, 1732, 1786, 1873, 1941
Offset: 1

Views

Author

Omar E. Pol, Jan 31 2014

Keywords

Examples

			For n = 6 the sets of divisors of the positive integers <= 6 are {1}, {1, 2}, {1, 3}, {1, 2, 4}, {1, 5}, {1, 2, 3, 6}. There are 14 total divisors and their sum is 1 + 3 + 4 + 7 + 6 + 12 = 33, so a(6) = 33 - 14 = 19.
		

Crossrefs

Partial sums of A065608.

Programs

  • Magma
    [(&+[DivisorSigma(1, k) - DivisorSigma(0, k) : k in [1..n]]): n in [1..60]]; // Vincenzo Librandi, Aug 02 2019
    
  • Maple
    A236632:=n->(1/2)*add(floor(n/i)*floor((n-i)/i), i=1..n): seq(A236632(n), n=1..100); # Wesley Ivan Hurt, Jan 30 2016
    N:= 1000: # to get a(1) to a(N)
    A065608:= Vector(N):
    for a from 1 to floor(sqrt(N)) do for b from a to N/a do
       if b = a then
         A065608[a*b] := A065608[a*b] + a - 1
       else
         A065608[a*b] := A065608[a*b] + a + b - 2;
       fi
    od od:
    ListTools:-PartialSums(convert(A065608,list)); # Robert Israel, May 16 2016
  • Mathematica
    Table[Sum[Floor[n/i]*Floor[(n - i)/i], {i, n}]/2, {n, 50}] (* Wesley Ivan Hurt, Jan 30 2016 *)
    Table[Sum[Binomial[Floor[n/i], 2], {i, n}], {n, 51}] (* Michael De Vlieger, May 15 2016 *)
    Accumulate@ Table[DivisorSum[n, # - 1 &], {n, 51}] (* or *)
    Table[Sum [(k - 1) Floor[n/k], {k, n}], {n, 51}] (* Michael De Vlieger, Apr 03 2017 *)
  • PARI
    a(n) = sum(i=1, n, sigma(i)) - sum(i=1, n, numdiv(i)); \\ Michel Marcus, Feb 01 2014
    
  • Python
    from math import isqrt
    def A236632(n): return (s:=isqrt(n))**2*(1-s)+sum((q:=n//k)*((k<<1)+q-3) for k in range(1,s+1))>>1 # Chai Wah Wu, Oct 23 2023

Formula

a(n) = A024916(n) - A006218(n).
a(n) = (1/2) * Sum_{i=1..n} floor(n/i) * floor((n-i)/i). - Wesley Ivan Hurt, Jan 30 2016
a(n) = Sum_{i=1..n} binomial(floor(n/i),2). - Wesley Ivan Hurt, May 08 2016
a(n) = Sum_{k=1..n} (k-1) * floor(n/k). - Wesley Ivan Hurt, Apr 02 2017
a(n) = (1/2)*(A222548(n) - A006218(n)). - Ridouane Oudra, Aug 01 2019

A296081 a(n) = gcd(tau(n)-1, sigma(n)-1), where tau = A000005 and sigma = A000203.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 7, 1, 7, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 5, 5, 8, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Dec 05 2017

Keywords

Crossrefs

Programs

Formula

a(n) = gcd(A032741(n), A039653(n)).
a(n) = gcd(A039653(n), A065608(n)).

A152992 a(n) = sigma(n) - d(n) - pi(n).

Original entry on oeis.org

0, 0, 0, 2, 1, 5, 2, 7, 6, 10, 5, 17, 6, 14, 14, 20, 9, 26, 10, 28, 20, 24, 13, 43, 19, 29, 27, 41, 18, 54, 19, 46, 33, 39, 33, 71, 24, 44, 40, 70, 27, 75, 28, 64, 58, 54, 31, 99, 39, 72, 53, 77, 36, 96, 52, 96, 60, 70, 41, 139, 42, 74, 80, 102, 62, 118, 47, 101, 73, 117, 50
Offset: 1

Views

Author

Omar E. Pol, Dec 19 2008, Dec 31 2008

Keywords

Examples

			a(15) = 24 - 4 - 6 = 14 because the sum of divisors of 15 is 1 + 3 + 5 + 15 = 24, the number of divisors of 15 is 4 (1,3,5,15) and the number of primes not exceeding 15 is 6 (2,3,5,7,11,13). - _Emeric Deutsch_, Dec 30 2008
		

Crossrefs

Programs

  • Maple
    with(numtheory): seq(sigma(n)-tau(n)-pi(n), n = 1 .. 75); # Emeric Deutsch, Dec 30 2008
  • Mathematica
    Table[DivisorSigma[1,n]-DivisorSigma[0,n]-PrimePi[n],{n,75}] (* Harvey P. Dale, Sep 19 2011 *)

Formula

a(n) = A000203(n) - A000005(n) - A000720(n) = A065608(n) - A000720(n) = A152991(n) - A000005(n).

Extensions

Corrected and extended by Emeric Deutsch, Dec 30 2008

A158901 A051731 * (1, 1, 2, 3, 4, 5, ...).

Original entry on oeis.org

1, 2, 3, 5, 5, 9, 7, 12, 11, 15, 11, 23, 13, 21, 21, 27, 17, 34, 19, 37, 29, 33, 23, 53, 29, 39, 37, 51, 29, 65, 31, 58, 45, 51, 45, 83, 37, 57, 53, 83, 41, 89, 43, 79, 73, 69, 47, 115, 55, 88, 69, 93, 53, 113, 69, 113, 77, 87, 59, 157, 61, 93, 99, 121, 81, 137, 67, 121, 93, 137
Offset: 1

Views

Author

Gary W. Adamson, Mar 29 2009

Keywords

Comments

a(n) = prime(n) if n is prime but nonprime n's can also have prime a(n).
Equals left border of triangle A158902.

Examples

			a(4) = 5 = (1, 1, 0, 1) dot (1, 1, 2, 3) = (1 + 1 + 0 + 3); where (1, 1, 0, 1) = row 4 of triangle A051731.
		

Crossrefs

Cf. A158902.

Programs

  • Maple
    L := [1,seq(n, n=1..100)] ; read("transforms"); MOBIUSi(L) ; # R. J. Mathar, Apr 02 2009
  • PARI
    a(n) = sigma(n) - numdiv(n) + 1; \\ Michel Marcus, Sep 14 2017

Formula

A051731 * [1, 1, 2, 3, 4, 5, ...] = inverse Mobius transform of [1, 1, 2, 3, 4, ...].
a(n) = sigma(n) - d(n) + 1. - Juri-Stepan Gerasimov, Aug 30 2009
a(n) = 1 + A065608(n). - R. J. Mathar, Jan 08 2015

A386791 Triangle read by rows: T(n, k) = (n - k)/k if k divides n - k else 0 for k > 0, T(n, 0) = 0^n.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 3, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 5, 2, 1, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 3, 0, 1, 0, 0, 0, 0, 0, 8, 0, 2, 0, 0, 0, 0, 0, 0, 0, 9, 4, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 5, 3, 2, 0, 1, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Peter Luschny, Aug 04 2025

Keywords

Examples

			Triangle begins:
  [ 0] 1;
  [ 1] 0,  0;
  [ 2] 0,  1, 0;
  [ 3] 0,  2, 0, 0;
  [ 4] 0,  3, 1, 0, 0;
  [ 5] 0,  4, 0, 0, 0, 0;
  [ 6] 0,  5, 2, 1, 0, 0, 0;
  [ 7] 0,  6, 0, 0, 0, 0, 0, 0;
  [ 8] 0,  7, 3, 0, 1, 0, 0, 0, 0;
  [ 9] 0,  8, 0, 2, 0, 0, 0, 0, 0, 0;
  [10] 0,  9, 4, 0, 0, 1, 0, 0, 0, 0, 0;
  [11] 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  [12] 0, 11, 5, 3, 2, 0, 1, 0, 0, 0, 0, 0, 0;
		

Crossrefs

Cf. A000007 (column 0 and main diagonal), A065608 (row sums), A000012 (central terms), A175992 (subtriangle of sign), A386790.

Programs

  • Maple
    A386791 := (n, k) -> ifelse(k = 0, 0^n, ifelse(modp(n-k, k) = 0, iquo(n-k, k), 0)):
    seq(seq(A386791(n, k), k = 0..n), n = 0..12);
  • Mathematica
    A386791[n_, k_] := If[k == 0, Boole[k == n], If[Divisible[n-k, k], Quotient[n-k, k], 0]];
    Table[A386791[n, k], {n, 0, 12}, {k, 0, n}] // Flatten
  • SageMath
    def A386791(n, k):
        if k == 0: return int(k == n)
        return (n - k) // k if k.divides(n - k) else 0
    for n in (0..12):
        print([A386791(n, k) for k in (0..n)])

Formula

Sum_{k=0..n} T(n, k) = A000203(n) - A000005(n) = A065608(n) for n > 0.
sign(T(n, k)) = A175992(n, k) for n, k >= 1.
T(2*n, n) = A000012(n).

A165797 a(n) = n^( sigma(n) - tau(n) ).

Original entry on oeis.org

1, 2, 9, 256, 625, 1679616, 117649, 8589934592, 3486784401, 100000000000000, 25937424601, 552061438912436417593344, 23298085122481, 83668255425284801560576, 332525673007965087890625
Offset: 1

Views

Author

Jaroslav Krizek, Sep 27 2009

Keywords

Comments

The power of n with exponent given by the difference between its sum of divisors and its count of divisors.

Examples

			a(4) = 4^(sigma(4)-tau(4)) = 4^(7-3) = 4^4 = 256.
		

Programs

  • Mathematica
    Table[n^[ DivisorSigma[1, n] - DivisorSigma[0, n]], {n, 50}]

Formula

a(n) = n^(A000203(n)-A000005(n)) = n^A000203(n) / n^A000005(n) = n^A065608(n).
a(n) = A100879(n) / A062758(n).
a(p) = p^(p-1) for p = prime.

Extensions

Slightly edited by R. J. Mathar, Sep 29 2009

A176919 Triangle by columns: (1, 2, 3, ...) in each column interleaved with (0, 1, 2, ...) zeros. Columns > 1 shifted down twice.

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 0, 0, 0, 5, 2, 1, 0, 0, 6, 0, 0, 0, 0, 0, 7, 3, 0, 1, 0, 0, 0, 8, 0, 2, 0, 0, 0, 0, 0, 9, 4, 0, 0, 1, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 5, 3, 2, 0, 1, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gary W. Adamson & Mats Granvik, Apr 29 2010

Keywords

Comments

Row sums of n-th row = A065608(n+1).

Examples

			First few rows of the triangle:
   1;
   2, 0;
   3, 1, 0;
   4, 0, 0, 0;
   5, 2, 1, 0, 0;
   6, 0, 0, 0, 0, 0;
   7, 3, 0, 1, 0, 0, 0;
   8, 0, 2, 0, 0, 0, 0, 0;
   9, 4, 0, 0, 1, 0, 0, 0, 0;
  10, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  11, 5, 3, 2, 0, 1, 0, 0, 0, 0, 0;
  12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  13, 6, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0;
  14, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  15, 7, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0;
  16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  17, 8, 5, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0;
  18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  19, 9, 0, 4, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0;
  ...
		

Crossrefs

Cf. A065608.

Formula

Triangle, left border = (1, 2, 3, ...). Each successive column is shifted down twice from previous column and interleaved with k zeros.

A329104 Numbers m such that sigma(m) - tau(m) = 2m.

Original entry on oeis.org

56, 7192, 7232, 7912, 10792, 17272, 30592, 114256, 2154584, 3428368, 89245784
Offset: 1

Views

Author

Jaroslav Krizek, Nov 04 2019

Keywords

Comments

Abundant numbers m with abundance A(m) = tau(m).
Corresponding values of A(m) = tau(m): 8, 16, 14, 16, 16, 16, 16, 20, 32, 30, 32, ...
a(12) > 10^13, if it exists. - Giovanni Resta, Nov 07 2019

Examples

			Number 56 is in the sequence because sigma(56) - tau(56) = 2*56; 120 - 8 = 112.
		

Crossrefs

Cf. A083874 (deficient numbers m with deficiency D(m) = tau(m)).

Programs

  • Magma
    [m: m in [1..10^5] | SumOfDivisors(m) - NumberOfDivisors(m) eq 2*m];
    
  • Mathematica
    Select[Range[4*10^6], DivisorSigma[1, #] - DivisorSigma[0, #] == 2 # &] (* Amiram Eldar, Nov 04 2019 *)
  • PARI
    isok(m) = my(f=factor(m)); sigma(f) - numdiv(f) == 2*m; \\ Michel Marcus, Nov 05 2019

Extensions

a(11) from Amiram Eldar, Nov 04 2019

A330866 a(n) = Sum_{d|n, d

Original entry on oeis.org

0, 2, 6, 16, 20, 48, 42, 88, 90, 140, 110, 264, 156, 280, 300, 416, 272, 594, 342, 720, 588, 704, 506, 1248, 700, 988, 972, 1400, 812, 1920, 930, 1824, 1452, 1700, 1540, 2952, 1332, 2128, 2028, 3280, 1640, 3696, 1806, 3432, 3240, 3128, 2162, 5472, 2646, 4350, 3468
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 28 2020

Keywords

Comments

Total area of all distinct L X W rectangles such that s + t = n, 1 <= s <= t, s | n, L = t and W = n/s. - Wesley Ivan Hurt, Aug 01 2025

Examples

			a(6) = 48; The proper divisors of 6 are 1, 2 and 3. We have (6/1)*(6-1) + (6/2)*(6-2) + (6/3)*(6-3) = 30 + 12 + 6 = 48.
		

Crossrefs

Programs

  • Maple
    with(numtheory): seq(n*sigma(n) - n*tau(n), n=1..100); # Ridouane Oudra, Apr 11 2024
  • Mathematica
    Table[Sum[(n/i) (n-i) (1 - Ceiling[n/i] + Floor[n/i]), {i, n-1}], {n, 80}]
  • PARI
    a(n)={sumdiv(n, d, (n-d)*n/d)} \\ Andrew Howroyd, Apr 28 2020

Formula

a(p^k) = p^k * (p^(k+1) - p*(k+1) + k) / (p-1), where p is prime and k is a positive integer.
a(n) = n*sigma(n) - n*tau(n) = n*A065608(n). - Ridouane Oudra, Apr 11 2024

A355750 Sum of the divisors of 2n minus the number of divisors of 2n.

Original entry on oeis.org

1, 4, 8, 11, 14, 22, 20, 26, 33, 36, 32, 52, 38, 50, 64, 57, 50, 82, 56, 82, 88, 78, 68, 114, 87, 92, 112, 112, 86, 156, 92, 120, 136, 120, 136, 183, 110, 134, 160, 176, 122, 212, 128, 172, 222, 162, 140, 240, 165, 208, 208, 202, 158, 268, 208, 238, 232, 204, 176, 344, 182
Offset: 1

Views

Author

Wesley Ivan Hurt, Jul 15 2022

Keywords

Comments

Consider the partitions of 2n into 2 parts (s,t), where s <= t. a(n) gives the sum of all the quotients t/s such that t/s is an integer. (See example.)

Examples

			a(7) = 20; the partitions of 2*7 = 14 into two parts (s,t) where s <= t are: (1,13), (2,12), (3,11), (4,10), (5,9), (6,8), and (7,7). The sum of the quotients t/s such that each t/s is an integer is then: 13/1 + 12/2 + 7/7 = 13 + 6 + 1 = 20.
		

Crossrefs

Cf. A000005 (tau), A000203 (sigma), A062731, A099777.
Bisection of A065608.

Programs

  • Mathematica
    Table[DivisorSigma[1, 2 n] - DivisorSigma[0, 2 n], {n, 80}]
  • PARI
    a(n) = my(f=factor(2*n)); sigma(f) - numdiv(f); \\ Michel Marcus, Jul 16 2022

Formula

a(n) = sigma(2n) - tau(2n).
a(n) = Sum_{d|2n} (2n-d)/d.
a(n) = A065608(2n) = A000203(2n) - A000005(2n).
a(n) = A062731(n) - A099777(n).
a(n) = Sum_{k=1..n} m*c(m), where m=(2n-k)/k and c(m)=1-ceiling(m)+floor(m).
Previous Showing 31-40 of 41 results. Next