login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A054521 Triangle T(n,k): T(n,k) = 1 if gcd(n, k) = 1, T(n,k) = 0 otherwise (n >= 1, 1 <= k <= n). 54

%I

%S 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,

%T 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,

%U 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

%N Triangle T(n,k): T(n,k) = 1 if gcd(n, k) = 1, T(n,k) = 0 otherwise (n >= 1, 1 <= k <= n).

%C Row sums = phi(n), A000010: (1, 1, 2, 2, 4, 2, 6, ...). - _Gary W. Adamson_, May 20 2007

%C Characteristic function of A169581: a(A169581(n)) = 1; a(A169582(n)) = 0. - _Reinhard Zumkeller_, Dec 02 2009

%C 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.

%C T(n,k) = |K(n-k|k)| where K(i|j) is the Kronecker symbol. - _Peter Luschny_, Aug 05 2012

%C 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

%C The number of zeros in the n-th row of the triangle is cototient(n) = A051953(n). - _Omar E. Pol_, Apr 21 2017

%H Reinhard Zumkeller, <a href="/A054521/b054521.txt">Rows n = 1..125 of triangle, flattened</a>

%H Jakub Jaroslaw Ciaston, <a href="/plot2a?name1=A054531&amp;name2=A164306&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=0&amp;radiop1=xy&amp;drawpoints=true">A054531 vs A164306</a> (plot shows these ones)

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F T(n,k) = A063524(A050873(n,k)). - _Reinhard Zumkeller_, Dec 02 2009, corrected Sep 03 2015

%F T(n,k) = A054431(n,k) = A054431(k,n). - _R. J. Mathar_, Jul 21 2016

%e The triangle T(n,k) begins:

%e n\k 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...

%e 1: 1

%e 2: 1 0

%e 3: 1 1 0

%e 4: 1 0 1 0

%e 5: 1 1 1 1 0

%e 6: 1 0 0 0 1 0

%e 7: 1 1 1 1 1 1 0

%e 8: 1 0 1 0 1 0 1 0

%e 9: 1 1 0 1 1 0 1 1 0

%e 10: 1 0 1 0 0 0 1 0 1 0

%e 11: 1 1 1 1 1 1 1 1 1 1 0

%e 12: 1 0 0 0 1 0 1 0 0 0 1 0

%e 13: 1 1 1 1 1 1 1 1 1 1 1 1 0

%e 14: 1 0 1 0 1 0 0 0 1 0 1 0 1 0

%e 15: 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0

%e ... (Reformatted by _Wolfdieter Lang_, Apr 26 2013)

%e 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

%p A054521_row := n -> seq(abs(numtheory[jacobi](n-k,k)),k=1..n);

%p for n from 1 to 13 do A054521_row(n) od; # _Peter Luschny_, Aug 05 2012

%t T[ n_, k_] := Boole[ n>0 && k>0 && GCD[ n, k] == 1] (* _Michael Somos_, Jul 17 2011 *)

%t 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 *)

%o (PARI) {T(n, k) = n>0 && k>0 && gcd(n, k)==1} /* _Michael Somos_, Jul 17 2011 */

%o (Sage)

%o def A054521_row(n): return [abs(kronecker_symbol(n-k,k)) for k in (1..n)]

%o for n in (1..13): print A054521_row(n) # _Peter Luschny_, Aug 05 2012

%o (Haskell)

%o a054521 n k = a054521_tabl !! (n-1) !! (k-1)

%o a054521_row n = a054521_tabl !! (n-1)

%o a054521_tabl = map (map a063524) a050873_tabl

%o a054521_list = concat a054521_tabl

%o -- _Reinhard Zumkeller_, Sep 03 2015

%Y Cf. A051731, A054522, A215200.

%Y Cf. A050873, A063524.

%K nonn,tabl

%O 1,1

%A _N. J. A. Sloane_, Apr 09 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 20 13:18 EDT 2019. Contains 321345 sequences. (Running on oeis4.)