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.

A132442 Triangle whose n-th row consists of the first n terms of the n-th row of A134866.

Original entry on oeis.org

1, 1, 3, 1, 1, 4, 1, 3, 1, 7, 1, 1, 1, 1, 6, 1, 3, 4, 3, 1, 12, 1, 1, 1, 1, 1, 1, 8, 1, 3, 1, 7, 1, 3, 1, 15, 1, 1, 4, 1, 1, 4, 1, 1, 13, 1, 3, 1, 3, 6, 3, 1, 3, 1, 18, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 1, 3, 4, 7, 1, 12, 1, 7, 4, 3, 1, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 1, 3, 1, 3, 1, 3, 8, 3, 1, 3, 1, 3, 1, 24
Offset: 1

Views

Author

Gary W. Adamson, Nov 14 2007

Keywords

Comments

Previous name: Triangle, n-th row = first n terms of n-th row of an array formed by A051731 * A127093 (transform).
Right border = sigma(n), A000203.
Row sums = A038040.
The function T(n,k) = T(k,n) is defined for k > n, but only the values of k in 1..n as a triangular array are listed here.

Examples

			First few rows of the A134866 array:
  1,  1,  1,  1,  1,  1,  1, ...
  1,  3,  1,  3,  1,  3,  1, ...
  1,  1,  4,  1,  1,  4,  1, ...
  1,  3,  1,  7,  1,  3,  1, ...
  1,  1,  1,  1,  6,  1,  1, ...
  1,  3,  4,  3,  1, 12,  1, ...
  ...
First few rows of the triangle:
  1;
  1,  3;
  1,  1,  4;
  1,  3,  1,  7;
  1,  1,  1,  1,  6;
  1,  3,  4,  3,  1, 12;
  1,  1,  1,  1,  1,  1,  8;
  1,  3,  1,  7,  1,  3,  1, 15;
  ...
		

Crossrefs

Cf. A038040 (row sums), A000203 (right border), A050873 (gcd(n,k)).
Cf. A000142 (determinant).
Cf. A134866.

Programs

  • Haskell
    a132442 n k = a132442_tabl !! (n-1) !! (k-1)
    a132442_row n = a132442_tabl !! (n-1)
    a132442_tabl = map (map a000203) a050873_tabl
    -- Reinhard Zumkeller, Dec 12 2015
  • Mathematica
    T[ n_, k_] := If[ n < 1 || k < 1, 0, If[ k > n, T[ k, n], If[ k == 1, 1, If[ n > k, T[ k, Mod[ n, k, 1]],  DivisorSigma [1, n]]]]] (* Michael Somos, Jul 18 2011 *)
  • PARI
    {T(n, k) = if( n<1 || k<1, 0, if( k>n, T(k, n), if( k==1, 1, if( n>k, T(k, (n-1)%k+1), sigma( n)))))} /* Michael Somos, Jul 18 2011 */
    

Formula

T(n,k) = A000203(gcd(n,k)). - Reinhard Zumkeller, Dec 12 2015

Extensions

Missing T(10,9) = 1 inserted by Reinhard Zumkeller, Dec 12 2015
Name edited by Michel Marcus, Dec 21 2022

A094471 a(n) = Sum_{(n - k)|n, 0 <= k <= n} k.

Original entry on oeis.org

0, 1, 2, 5, 4, 12, 6, 17, 14, 22, 10, 44, 12, 32, 36, 49, 16, 69, 18, 78, 52, 52, 22, 132, 44, 62, 68, 112, 28, 168, 30, 129, 84, 82, 92, 233, 36, 92, 100, 230, 40, 240, 42, 180, 192, 112, 46, 356, 90, 207, 132, 214, 52, 312, 148, 328, 148, 142, 58, 552, 60
Offset: 1

Views

Author

Labos Elemer, May 28 2004

Keywords

Comments

Not all values arise and some arise more than once.
Row sums of triangle A134866. - Gary W. Adamson, Nov 14 2007
Sum of the largest parts of the partitions of n into two parts such that the smaller part divides the larger. - Wesley Ivan Hurt, Dec 21 2017
a(n) is also the sum of all parts minus the total number of parts of all partitions of n into equal parts (an interpretation of the Torlach Rush's formula). - Omar E. Pol, Nov 30 2019
If and only if sigma(n) divides a(n), then n is one of Ore's Harmonic numbers, A001599. - Antti Karttunen, Jul 18 2020

Examples

			q^2 + 2*q^3 + 5*q^4 + 4*q^5 + 12*q^6 + 6*q^7 + 17*q^8 + 14*q^9 + ...
For n = 4 the partitions of 4 into equal parts are [4], [2,2], [1,1,1,1]. The sum of all parts is 4 + 2 + 2 + 1 + 1 + 1 + 1 = 12. There are 7 parts, so a(4) = 12 - 7 = 5. - _Omar E. Pol_, Nov 30 2019
		

References

  • P. A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 2, p 30.

Crossrefs

Cf. A000005, A000010, A000203, A001599, A038040, A134866, A152211, A244051, A324121 (= gcd(a(n), sigma(n))).
Cf. A088827 (positions of odd terms).

Programs

  • Julia
    using AbstractAlgebra
    function A094471(n)
        sum(k for k in 0:n if is_divisible_by(n, n - k))
    end
    [A094471(n) for n in 1:61] |> println  # Peter Luschny, Nov 14 2023
    
  • Maple
    with(numtheory); A094471:=n->n*tau(n)-sigma(n); seq(A094471(k), k=1..100); # Wesley Ivan Hurt, Oct 27 2013
    divides := (k, n) -> k = n or (k > 0 and irem(n, k) = 0):
    a := n -> local k; add(`if`(divides(n - k, n), k, 0), k = 0..n):
    seq(a(n), n = 1..61);  # Peter Luschny, Nov 14 2023
  • Mathematica
    Table[n*DivisorSigma[0, n] - DivisorSigma[1, n], {n, 1, 100}]
  • PARI
    {a(n) = n*numdiv(n) - sigma(n)} /* Michael Somos, Jan 25 2008 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A094471(n):
        f = factorint(n).items()
        return n*prod(e+1 for p,e in f)-prod((p**(e+1)-1)//(p-1) for p,e in f)
    # Chai Wah Wu, Nov 14 2023
  • SageMath
    def A094471(n): return sum(k for k in (0..n) if (n-k).divides(n))
    print([A094471(n) for n in range(1, 62)])  # Peter Luschny, Nov 14 2023
    

Formula

a(n) = n*tau(n) - sigma(n) = n*A000005(n) - A000203(n). [Previous name.]
If p is prime, then a(p) = p*tau(p)-sigma(p) = 2p-(p+1) = p-1 = phi(p).
If n>1, then a(n)>0.
a(n) = Sum_{d|n} (n-d). - Amarnath Murthy, Jul 31 2005
G.f.: Sum_{k>=1} k*x^(2*k)/(1 - x^k)^2. - Ilya Gutkovskiy, Oct 24 2018
a(n) = A038040(n) - A000203(n). - Torlach Rush, Feb 02 2019

Extensions

Simpler name by Peter Luschny, Nov 14 2023

A359111 a(n) is the permanent of the n X n matrix M(n) that is defined by M[i,j] = sigma(gcd(i,j)).

Original entry on oeis.org

1, 1, 4, 22, 266, 2218, 58100, 644828, 20949776, 502226904, 20622109728, 339816568512, 29770028441472, 568704136553760, 31544507027061120, 1864702918415957568, 150882403284582339072, 3672279699978976000896, 458988841789031457035136, 12369374876487501375431040
Offset: 0

Views

Author

Michel Marcus, Dec 18 2022

Keywords

Crossrefs

Cf. A000142 (determinant), A134866 (matrix).

Programs

  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, sigma(gcd(i,j))));
Showing 1-3 of 3 results.