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

A127445 Triangle defined by the matrix product A126988 * A127368, read by rows.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Jan 14 2007

Keywords

Examples

			First few rows of the triangle are:
1;
3, 0;
4, 2, 0;
7, 0, 3, 0;
6, 2, 3, 4, 0;
12, 4, 0, 0, 5, 0;
8, 2, 3, 4, 5, 6, 0;
...
		

Crossrefs

Cf. A126988, A127368, A000217 (row sums), A000203 (column k=1).

Programs

Formula

T(n,k) = Sum_{j=k..n} A126988(n,j) * A127368(j,k), 1<=k<=n.

A143612 Triangle read by rows, A127368 * A000012, 1<=k<=n.

Original entry on oeis.org

1, 1, 0, 3, 2, 0, 4, 3, 3, 0, 10, 9, 7, 4, 0, 6, 5, 5, 5, 5, 0, 21, 20, 18, 15, 11, 6, 0, 16, 15, 15, 12, 12, 7, 7, 0, 27, 26, 24, 24, 20, 15, 15, 8, 0, 20, 19, 19, 16, 16, 16, 16, 9, 9, 0, 55, 54, 52, 49, 45, 40, 34, 27, 19, 10, 0, 24, 23, 23, 23, 23, 18, 18, 11, 11, 11, 11, 0, 78, 77, 75
Offset: 1

Views

Author

Gary W. Adamson, Aug 27 2008

Keywords

Comments

Triangle read by rows, A127368 * A000012, 1<=k<=n. Triangle A127368 records the reduced residue system mod n. The operator A000012 takes partial sums starting from the right in A127368 rows.

Examples

			First few rows of the triangle =
1;
1, 0;
3, 2, 0;
4, 3, 3, 0;
10, 9, 7, 4, 0;
6, 5, 5, 5, 5, 0;
21, 20, 18, 15, 11, 6, 0;
16, 15, 15, 12, 12, 7, 7, 0;
...
Row 5 = (10, 9, 7, 4, 0) since row 5 of triangle A127368 = (1, 2, 3, 4, 0).
		

Crossrefs

Cf. A127368, A023896 (left border), A053818 (row sums).

Extensions

Corrected by Jaroslav Krizek, May 28 2010

A143613 Triangle read by rows: A051731 * A127368.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Aug 27 2008

Keywords

Comments

A051731 = the inverse Moebius transform.
A127368 records the reduced residue system mod n, by rows.
Left border = d(n).
Row sums = A057661: (1, 2, 4, 6, 11, 11, 22, 22, 31, ...).

Examples

			First few rows of the triangle;
  1;
  2, 0;
  2, 2, 0;
  3, 0, 3, 0;
  2, 2, 3, 4, 0;
  4, 2, 0, 0, 5, 0;
  2, 2, 3, 4, 5, 6, 0;
  ...
		

Crossrefs

Extensions

a(78) = 0 inserted by Georg Fischer, Jun 05 2023

A143728 Triangle read by rows: termwise product of mu(n) and n-th row of A127368.

Original entry on oeis.org

1, 1, 0, 1, -2, 0, 1, 0, -3, 0, 1, -2, -3, 0, 0, 1, 0, 0, 0, -5, 0, 1, -2, -3, 0, -5, 6, 0, 1, 0, -3, 0, -5, 0, -7, 0, 1, -2, 0, 0, -5, 0, -7, 0, 0, 1, 0, -3, 0, 0, 0, -7, 0, 0, 0, 1, -2, -3, 0, -5, 6, -7, 0, 0, 10, 0, 1, 0, 0, 0, -5, 0, -7, 0, 0, 0, -11, 0, 1, -2, -3, 0, -5, 6, -7, 0, 0, 10, -11, 0, 0
Offset: 1

Views

Author

Gary W. Adamson, Aug 30 2008

Keywords

Comments

The operation A127368 * A128407 forms the termwise product of mu(n) and the n-th row of A127368: deleting all squares and changing the sign of primes to (-1).
Row sums = A143729: (1, 1, -1, -2, -4, -4, -3, -14, ...)

Examples

			First few terms of the triangle:
  1;
  1,  0;
  1, -2,  0;
  1,  0, -3,  0;
  1, -2, -3,  0,  0;
  1,  0,  0,  0, -5,  0;
  1, -2, -3,  0, -5,  6,  0;
  1,  0, -3,  0, -5,  0, -7,  0;
  ...
Example: row 7 = (1, -2, -3, 0, -5, 6, 0). We take row 7 of triangle A127368 which records the relative primes of 7 as (1, 2, 3, 4, 5, 6, 0). Applying the termwise product of the first 7 terms of mu(k): (1, -1, -1, 0, -1, 1, -1), we get (1, -2, -3, 0, -5, 6, 0), noting that the "4" has been deleted.
		

Crossrefs

Formula

Triangle read by rows, A127368 * A128407, 1 <= k <= n; T(n,k) = {1<=k<=n, gcd(k,n)=1} * mu(k).

Extensions

Partially edited by N. J. A. Sloane, Jan 05 2009
a(66) = 0 inserted by Georg Fischer, Jun 05 2023

A023896 Sum of positive integers in smallest positive reduced residue system modulo n. a(1) = 1 by convention.

Original entry on oeis.org

1, 1, 3, 4, 10, 6, 21, 16, 27, 20, 55, 24, 78, 42, 60, 64, 136, 54, 171, 80, 126, 110, 253, 96, 250, 156, 243, 168, 406, 120, 465, 256, 330, 272, 420, 216, 666, 342, 468, 320, 820, 252, 903, 440, 540, 506, 1081, 384, 1029, 500, 816, 624, 1378, 486, 1100, 672
Offset: 1

Views

Author

Keywords

Comments

Sum of totatives of n, i.e., sum of integers up to n and coprime to n.
a(1) = 1, since 1 is coprime to any positive integer.
Row sums of A038566. - Wolfdieter Lang, May 03 2015
Islam & Manzoor prove that a(n) is an injection for n > 1, see links. In other words, if a(m) = a(n), and min(m, n) > 1, then m = n. - Muhammed Hedayet, May 19 2024

Examples

			G.f. = x + x^2 + 3*x^3 + 4*x^4 + 10*x^5 + 6*x^6 + 21*x^7 + 16*x^8 + 27*x^9 + ...
a(12) = 1 + 5 + 7 + 11 = 24.
n = 40: The smallest positive reduced residue system modulo 40 is {1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39}. The sum is a(40) = 320. Average is 20.
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, problem 16, the function phi_1(n).
  • David M. Burton, Elementary Number Theory, p. 171.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 2001, p. 163.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 111.

Crossrefs

Programs

  • Haskell
    a023896 = sum . a038566_row  -- Reinhard Zumkeller, Mar 04 2012
    
  • Magma
    [1] cat [n*EulerPhi(n)/2: n in [2..70]]; // Vincenzo Librandi, May 16 2015
    
  • Maple
    A023896 := proc(n)
        if n = 1 then
            1;
        else
            n*numtheory[phi](n)/2 ;
        end if;
    end proc: # R. J. Mathar, Sep 26 2013
  • Mathematica
    a[ n_ ] = n/2*EulerPhi[ n ]; a[ 1 ] = 1; Table[a[n], {n, 56}]
    a[ n_] := If[ n < 2, Boole[n == 1], Sum[ k Boole[1 == GCD[n, k]], { k, n}]]; (* Michael Somos, Jul 08 2014 *)
  • PARI
    {a(n) = if(n<2, n>0, n*eulerphi(n)/2)};
    
  • PARI
    A023896(n)=n*eulerphi(n)\/2 \\ about 10% faster. - M. F. Hasler, Feb 01 2021
    
  • Python
    from sympy import totient
    def A023896(n): return 1 if n == 1 else n*totient(n)//2 # Chai Wah Wu, Apr 08 2022
    
  • SageMath
    def A023896(n): return 1 if n == 1 else n*euler_phi(n)//2
    print([A023896(n) for n in range(1, 57)])  # Peter Luschny, Dec 03 2023

Formula

a(n) = n*A023022(n) for n > 2.
a(n) = phi(n^2)/2 = n*phi(n)/2 = A002618(n)/2 if n > 1, a(1)=1. See the Apostol reference for this exercise.
a(n) = Sum_{1 <= k < n, gcd(k, n) = 1} k.
If n = p is a prime, a(p) = T(p-1) where T(k) is the k-th triangular number (A000217). - Robert G. Wilson v, Jul 31 2004
Equals A054521 * [1,2,3,...]. - Gary W. Adamson, May 20 2007
a(n) = A053818(n) * A175506(n) / A175505(n). - Jaroslav Krizek, Aug 01 2010
If m,n > 1 and gcd(m,n) = 1 then a(m*n) = 2*a(m)*a(n). - Thomas Ordowski, Nov 09 2014
G.f.: Sum_{n>=1} mu(n)*n*x^n/(1-x^n)^3, where mu(n) = A008683(n). - Mamuka Jibladze, Apr 24 2015
G.f. A(x) satisfies A(x) = x/(1 - x)^3 - Sum_{k>=2} k * A(x^k). - Ilya Gutkovskiy, Sep 06 2019
For n > 1: a(n) = (n*A076512(n)/2)*A009195(n). - Jamie Morken, Dec 16 2019
Sum_{n>=1} 1/a(n) = 2 * A065484 - 1 = 3.407713... . - Amiram Eldar, Oct 09 2023

Extensions

Typos in programs corrected by Zak Seidov, Aug 03 2010
Name and example edited by Wolfdieter Lang, May 03 2015

A143729 Sum of termwise product of mu(k) and reduced residue system k mod n.

Original entry on oeis.org

1, 1, -2, -2, -4, -4, -3, -14, -13, -9, 0, -22, -11, -31
Offset: 1

Views

Author

Gary W. Adamson, Aug 30 2008

Keywords

Examples

			a(7) = -3 since the relative primes of 7 (Cf. row 7, triangle A127368) = (1, 2, 3, 4, 5, 6, 0). We apply the termwise product of mu(k), where mu(k) = A008683: (1, -1, -1, 0, -1, 1, -1,...) getting row 7 of triangle A143728: (1, -2, -3, 0, -5, 6, 0), sum = -3.
		

Crossrefs

Formula

a(n) = Sum_{1<=k<=n, GCD(k,n)=1} mu(k)*k. Equals row sums of triangle A143728.
Showing 1-6 of 6 results.