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

A215283 Row sums of triangle A215200.

Original entry on oeis.org

1, 1, 2, 2, 0, 2, 2, 0, 6, 2, 6, 0, 2, 4, 4, 8, 4, 0, 8, 0, 0, 2, 4, 0, 14, 6, 2, 0, -2, 4, 8, 0, 2, 4, 12, 12, 4, 6, 10, 0, 10, 4, 8, 0, 2, 4, 6, 0, 32, 2, 12, 0, 0, 2, 12, 0, 2, 2, 18, 0, 2, 8, 2, 32, 10, 8, 8, 0, 0, 4, 12, 0, -2, 10, 6, 0, 0, 4, 18, 0, 42
Offset: 1

Views

Author

Peter Luschny, Aug 07 2012

Keywords

Comments

The unsigned version of A215200 is A054521 which has as row sums the Euler totient function A000010.

Crossrefs

Programs

  • Maple
    f:= n -> add(numtheory:-jacobi(n-k,k),k=1..n); # Robert Israel, Mar 11 2018
  • Mathematica
    a[n_] := Sum[ KroneckerSymbol[n - k, k], {k, 1, n}]; Table[a[n], {n, 1, 81}] (* Jean-François Alcover, Jul 02 2013 *)
  • PARI
    a(n) = sum(k = 1, n, kronecker(n-k, k)); \\ Amiram Eldar, Nov 07 2024
  • Sage
    def A215200_row(n): return [kronecker_symbol(n-k, k) for k in (1..n)]
    [sum(A215200_row(n)) for n in (1..81)]
    

Formula

a(n) = Sum_{k=1..n} (n-k | k) where (i | j) is the Kronecker symbol.

A054521 Triangle read by rows: T(n,k) = 1 if gcd(n, k) = 1, T(n,k) = 0 otherwise (n >= 1, 1 <= k <= n).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0
Offset: 1

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

Row sums = phi(n), A000010: (1, 1, 2, 2, 4, 2, 6, ...). - Gary W. Adamson, May 20 2007
Characteristic function of A169581: a(A169581(n)) = 1; a(A169582(n)) = 0. - Reinhard Zumkeller, Dec 02 2009
The function T(n,k) = T(k,n) is defined for k > n but only the values for 1 <= k <= n as a triangular array are listed here.
T(n,k) = |K(n-k|k)| where K(i|j) is the Kronecker symbol. - Peter Luschny, Aug 05 2012
Twice the sum over the antidiagonals, starting with entry T(n-1,1), for n >= 3, is the same as the row n sum (i.e., phi(n): 2*Sum_{k=1..floor(n/2)} T(n-k,k) = phi(n), n >= 3). - Wolfdieter Lang, Apr 26 2013
The number of zeros in the n-th row of the triangle is cototient(n) = A051953(n). - Omar E. Pol, Apr 21 2017
This triangle is the j = 1 sub-triangle of A349221(n,k) = Sum_{j>=1} [k|binomial(n-1,k-1) AND gcd(n,k) = j], n >= 1, 1 <= k <= n, where [] is the Iverson bracket. - Richard L. Ollerton, Dec 14 2021

Examples

			The triangle T(n,k) begins:
  n\k  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
   1:  1
   2:  1  0
   3:  1  1  0
   4:  1  0  1  0
   5:  1  1  1  1  0
   6:  1  0  0  0  1  0
   7:  1  1  1  1  1  1  0
   8:  1  0  1  0  1  0  1  0
   9:  1  1  0  1  1  0  1  1  0
  10:  1  0  1  0  0  0  1  0  1  0
  11:  1  1  1  1  1  1  1  1  1  1  0
  12:  1  0  0  0  1  0  1  0  0  0  1  0
  13:  1  1  1  1  1  1  1  1  1  1  1  1  0
  14:  1  0  1  0  1  0  0  0  1  0  1  0  1  0
  15:  1  1  0  1  0  0  1  1  0  0  1  0  1  1  0
  ... (Reformatted by _Wolfdieter Lang_, Apr 26 2013)
Sums over antidiagonals: n = 3: 2*T(2,1) = 2 = T(3,1) + T(3,2) = phi(3). n = 4: 2*(T(3,1) + T(2,2)) = 2 = phi(4), etc. - _Wolfdieter Lang_, Apr 26 2013
		

Crossrefs

Programs

  • Haskell
    a054521 n k = a054521_tabl !! (n-1) !! (k-1)
    a054521_row n = a054521_tabl !! (n-1)
    a054521_tabl = map (map a063524) a050873_tabl
    a054521_list = concat a054521_tabl
    -- Reinhard Zumkeller, Sep 03 2015
  • Maple
    A054521_row := n -> seq(abs(numtheory[jacobi](n-k,k)),k=1..n);
    for n from 1 to 13 do A054521_row(n) od; # Peter Luschny, Aug 05 2012
  • Mathematica
    T[ n_, k_] := Boole[ n>0 && k>0 && GCD[ n, k] == 1] (* Michael Somos, Jul 17 2011 *)
    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]], 0]]]] (* Michael Somos, Jul 17 2011 *)
  • PARI
    {T(n, k) = n>0 && k>0 && gcd(n, k)==1} /* Michael Somos, Jul 17 2011 */
    
  • Sage
    def A054521_row(n): return [abs(kronecker_symbol(n-k,k)) for k in (1..n)]
    for n in (1..13): print(A054521_row(n)) # Peter Luschny, Aug 05 2012
    

Formula

T(n,k) = A063524(A050873(n,k)). - Reinhard Zumkeller, Dec 02 2009, corrected Sep 03 2015
T(n,k) = A054431(n,k) = A054431(k,n). - R. J. Mathar, Jul 21 2016

A054431 Array read by antidiagonals: T(x, y) tells whether (x, y) are coprime (1) or not (0).

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1
Offset: 1

Views

Author

Keywords

Comments

Array is read along (x, y) = (1, 1), (1, 2), (2, 1), (1, 3), (2, 2), (3, 1), ...
There are nontrivial infinite paths of 1's in this sequence, moving only 1 step down or to the right at each step. Starting at (1,1), move down to (2,1), then (3,1), ..., (13,1). Then move right to (13,2), (13,3), ..., (13,11). From this point, alternate moving down to the next prime row, and right to the next prime column. - Franklin T. Adams-Watters, May 27 2014

Examples

			Rows start:
  1, 1, 1, 1, 1, 1, ...;
  1, 0, 1, 0, 1, 0, ...;
  1, 1, 0, 1, 1, 0, ...;
  1, 0, 1, 0, 1, 0, ...;
  1, 1, 1, 1, 0, 1, ...;
  1, 0, 0, 0, 1, 0, ...;
		

Crossrefs

Equal to A003989 with non-one values replaced with zeros.

Programs

  • Maple
    reduced_residue_set_0_1_array := n -> one_or_zero(igcd(((n-((trinv(n)*(trinv(n)-1))/2))+1), ((((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1) ));
    one_or_zero := n -> `if`((1 = n),(1),(0)); # trinv given at A054425
    A054431_row := n -> seq(abs(numtheory[jacobi](n-k+1,k)),k=1..n);
    for n from 1 to 14 do A054431_row(n) od; # Peter Luschny, Aug 05 2012
  • Mathematica
    t[n_, k_] := Boole[CoprimeQ[n, k]]; Table[t[n-k+1, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 21 2012 *)
  • Sage
    def A054431_row(n): return [abs(kronecker_symbol(n-k+1,k)) for k in (1..n)]
    for n in (1..14): print(A054431_row(n)) # Peter Luschny, Aug 05 2012

Formula

T(n, k) = T(n, k-n) + T(n-k, k) starting with T(n, k)=0 if n or k are nonpositive and T(1, 1)=1. T(n, k) = A054521(n, k) if n>=k, = A054521(k, n) if n<=k. Antidiagonal sums are phi(n) = A000010(n). - Henry Bottomley, May 14 2002
As a triangular array for n>=1, 1<=k<=n, T(n,k) = |K(n-k+1|k)| where K(i|j) is the Kronecker symbol. - Peter Luschny, Aug 05 2012
Dirichlet g.f.: Sum_{n>=1} Sum_{k>=1} [gcd(n,k)=1]/n^s/k^c = zeta(s)*zeta(c)/zeta(s + c). - Mats Granvik, May 19 2021

A215284 Numbers m such that Sum_{k=1..m} (m - k | k) = 0, where (i|j) is the Kronecker symbol.

Original entry on oeis.org

5, 8, 12, 18, 20, 21, 24, 28, 32, 40, 44, 48, 52, 53, 56, 60, 68, 69, 72, 76, 77, 80, 84, 88, 92, 96, 99, 104, 108, 112, 116, 120, 124, 125, 126, 128, 132, 136, 140, 141, 148, 150, 152, 156, 160, 162, 164, 165, 168, 172, 176, 180, 184, 188, 189, 192, 197
Offset: 1

Views

Author

Peter Luschny, Aug 07 2012

Keywords

Comments

Appears to include all multiples of 4 that are not squares. - Robert Israel, Mar 11 2018

Crossrefs

Programs

  • Maple
    f:= n -> add(numtheory:-jacobi(n-k,k),k=1..n):
    select(n -> f(n)=0, [$1..300]); # Robert Israel, Mar 11 2018
  • Mathematica
    Select[ Range[200], Sum[ KroneckerSymbol[# - k, k], {k, 1, #}] == 0 & ] (* Jean-François Alcover, Jul 29 2013 *)
  • PARI
    is(m) = sum(k = 1, m, kronecker(m-k, k)) == 0; \\ Amiram Eldar, Nov 07 2024
  • Sage
    def A215200_row(n): return [kronecker_symbol(n-k, k) for k in (1..n)]
    [n for n in (1..197) if sum(A215200_row(n)) == 0]
    

A215285 Numbers m such that Sum_{k=1..m} (m - k | k) = phi(m), where (i|j) is the Kronecker symbol and phi(m) is the Euler totient function.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 16, 36, 64, 100, 144, 196, 256, 324, 400, 484, 576, 676, 784, 900, 1024, 1156, 1296, 1444, 1600, 1764, 1936, 2116, 2304, 2500, 2704, 2916, 3136, 3364, 3600, 3844, 4096, 4356, 4624, 4900, 5184, 5476, 5776, 6084, 6400, 6724, 7056, 7396, 7744
Offset: 1

Views

Author

Peter Luschny, Aug 07 2012

Keywords

Comments

n is in this sequence if and only if sum_{k=1..n} (n-k|k) = sum_{k=1..n} |(n-k|k)|.

Crossrefs

Programs

  • Mathematica
    Reap[ Do[ If[ Sum[ KroneckerSymbol[n - k, k], {k, 1, n}] == EulerPhi[n], Print[n]; Sow[n]], {n, 1, 8000}]][[2, 1]] (* Jean-François Alcover, Jul 29 2013 *)
  • PARI
    is(m) = sum(k = 1, m, kronecker(m-k, k)) == eulerphi(m); \\ Amiram Eldar, Nov 08 2024
  • Sage
    def A215200_row(n): return [kronecker_symbol(n-k, k) for k in (1..n)]
    [n for n in (1..1000) if sum(A215200_row(n)) == euler_phi(n)]
    

A327785 Square array read by antidiagonals: A(n,k) = Sum_{d|n} (k/d), (n>=1, k>=0), where (m/n) is the Kronecker symbol.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 0, 3, 1, 1, 1, 1, 1, 2, 1, 1, 0, 2, 1, 0, 4, 1, 1, 1, 0, 1, 0, 0, 2, 1, 1, 2, 1, 1, 2, 0, 2, 4, 1, 1, 1, 2, 1, 1, 2, 0, 1, 3, 1, 1, 2, 0, 3, 2, 0, 2, 0, 1, 4, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 2, 3, 0, 4, 0, 0, 3, 0, 0, 6, 1
Offset: 1

Views

Author

Seiichi Manyama, Sep 25 2019

Keywords

Examples

			Square array begins:
   1, 1, 1, 1, 1, 1, 1, 1, ...
   1, 2, 1, 0, 1, 0, 1, 2, ...
   1, 2, 0, 1, 2, 0, 1, 2, ...
   1, 3, 1, 1, 1, 1, 1, 3, ...
   1, 2, 0, 0, 2, 1, 2, 0, ...
   1, 4, 0, 0, 2, 0, 1, 4, ...
   1, 2, 2, 0, 2, 0, 0, 1, ...
   1, 4, 1, 0, 1, 0, 1, 4, ...
		

Crossrefs

Programs

  • Mathematica
    A[n_, k_] := Sum[KroneckerSymbol[k, d], {d, Divisors[n]}];
    Table[A[n - k, k], {n, 1, 13}, {k, n - 1, 0, -1}] // Flatten (* Jean-François Alcover, Sep 25 2019 *)

A323377 Square array read by ascending antidiagonals: T(n,k) = Kronecker(prime(n)/prime(k)), n, k >= 1.

Original entry on oeis.org

0, -1, -1, -1, 0, -1, 1, -1, -1, 1, -1, 1, 0, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 0, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1
Offset: 1

Views

Author

Jianing Song, Jan 12 2019

Keywords

Comments

The n-th row is the same as the n-th column if and only if n = 1 or prime(n) == 1 (mod 4).
In general, for any m != 0 and n > 0, Kronecker symbol (m/n) can be written as the product of the terms of this table and the terms of the form (-1/p) where p is any prime.
According to Chebyshev's bias, there seem to be more -1's than 1's among the first terms of any row or any column. One can see from the table in the example section that there are 54 -1's and 36 1's in the upper left 10 X 10 square of the table. There are 5158 -1's and 4742 1's in the upper left 100 X 100 square of the table.

Examples

			Table begins
     |  k  |  1   2   3   4   5   6   7   8   9  10  ...
   n | p() |  2   3   5   7  11  13  17  19  23  29  ...
  ---+-----+--------------------------------------------
   1 |   2 |  0, -1, -1,  1, -1, -1,  1, -1,  1, -1, ...
   2 |   3 | -1,  0, -1, -1,  1,  1, -1, -1,  1, -1, ...
   3 |   5 | -1, -1,  0, -1,  1, -1, -1,  1, -1,  1, ...
   4 |   7 |  1,  1, -1,  0, -1, -1, -1,  1, -1,  1, ...
   5 |  11 | -1, -1,  1,  1,  0, -1, -1,  1, -1, -1, ...
   6 |  13 | -1,  1, -1, -1, -1,  0,  1, -1,  1,  1, ...
   7 |  17 |  1, -1, -1, -1, -1,  1,  0,  1, -1, -1, ...
   8 |  19 | -1,  1,  1, -1, -1, -1,  1,  0, -1, -1, ...
   9 |  23 |  1, -1, -1,  1,  1,  1, -1,  1,  0,  1, ...
  10 |  29 | -1, -1,  1,  1, -1,  1, -1, -1,  1,  0, ...
  ...
		

Crossrefs

Cf. A215200.
Cf. A226523 (1st row and 1st column), A257834 (2nd row), A134323 (2nd column).

Programs

  • PARI
    T(n,k) = kronecker(prime(n), prime(k))

Formula

T(n,k) = A215200(prime(n) + prime(k), prime(k)).

A323378 Square array read by antidiagonals: T(n,k) = Kronecker symbol (-n/k), n >= 1, k >= 1.

Original entry on oeis.org

1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 0, 0, 0, 1, 1, -1, -1, 1, -1, -1, 1, 0, 1, 0, -1, 0, -1, 1, 1, 0, 1, 1, 0, -1, 1, 1, 0, -1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1
Offset: 1

Views

Author

Jianing Song, Jan 12 2019

Keywords

Comments

If A215200 is arranged into a square array A215200(n,k) = kronecker symbol(n/k) with n >= 0, k >= 1, then this sequence gives the other half of the array.
Note that there is no such n such that the n-th row and the n-th column are the same.

Examples

			Table begins
  1,  1, -1,  1,  1, -1, -1,  1,  1,  1, ... ((-1/k) = A034947)
  1,  0,  1,  0, -1,  0, -1,  0,  1,  0, ... ((-2/k) = A188510)
  1, -1,  0,  1, -1,  0,  1, -1,  0,  1, ... ((-3/k) = A102283)
  1,  0, -1,  0,  1,  0, -1,  0,  1,  0, ... ((-4/k) = A101455)
  1, -1,  1,  1,  0, -1,  1, -1,  1,  0, ... ((-5/k) = A226162)
  1,  0,  0,  0,  1,  0,  1,  0,  0,  0, ... ((-6/k) = A109017)
  1,  1, -1,  1, -1, -1,  0,  1,  1, -1, ... ((-7/k) = A175629)
  1,  0,  1,  0, -1,  0, -1,  0,  1,  0, ... ((-8/k) = A188510)
  ...
		

Crossrefs

Cf. A215200.
The first rows are listed in A034947, A188510, A102283, A101455, A226162, A109017, A175629, A188510, ...

Programs

  • PARI
    T(n,k) = kronecker(-n, k)
Showing 1-8 of 8 results.