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.

A164295 Triangle T(n,k) read by rows: sum of the triangles A054521 and A051731.

This page as a plain text file.
%I A164295 #9 Sep 13 2017 12:22:26
%S A164295 2,2,1,2,1,1,2,1,1,1,2,1,1,1,1,2,1,1,0,1,1,2,1,1,1,1,1,1,2,1,1,1,1,0,
%T A164295 1,1,2,1,1,1,1,0,1,1,1,2,1,1,0,1,0,1,0,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,
%U A164295 1,1,1,1,1,0,0,0,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,0,1,0,1,0,1,0,1,0,1,1
%N A164295 Triangle T(n,k) read by rows: sum of the triangles A054521 and A051731.
%C A164295 Zeros in the table, for example T(6,4)=0, indicate that the row and column indices n and k are not coprime and in addition that there is a nonzero remainder n (mod k).
%H A164295 G. C. Greubel, <a href="/A164295/b164295.txt">Table of n, a(n) for the first 50 rows, flattened</a>
%F A164295 T(n,k) = A054521(n,k) + A051731(n,k), 1<=k<=n, 1<=n.
%e A164295 The table starts
%e A164295 2
%e A164295 2, 1
%e A164295 2, 1, 1
%e A164295 2, 1, 1, 1
%e A164295 2, 1, 1, 1, 1
%e A164295 2, 1, 1, 0, 1, 1
%e A164295 2, 1, 1, 1, 1, 1, 1
%e A164295 2, 1, 1, 1, 1, 0, 1, 1
%e A164295 2, 1, 1, 1, 1, 0, 1, 1, 1
%e A164295 2, 1, 1, 0, 1, 0, 1, 0, 1, 1
%p A164295 A054521 := proc(n,k) if gcd(n,k) = 1 then 1; else 0 ; fi; end:
%p A164295 A051731 := proc(n,k) if (n mod k) = 0 then 1; else 0 ; fi; end:
%p A164295 A164295 := proc(n,k) A054521(n,k)+A051731(n,k) ; end: seq(seq(A164295(n,k),k=1..n),n=1..10) ;
%t A164295 T[n_, k_] = If[Mod[n, k] == 0, 1, 0] + If[GCD[n, k] == 1, 1, 0];
%t A164295 Table[Table[T[n, k], {k, 1, n}], {n, 1, 10}]; Flatten[%]
%Y A164295 Cf. A054521, A051731.
%K A164295 nonn,tabl
%O A164295 1,1
%A A164295 _Roger L. Bagula_ and _Mats Granvik_, Aug 12 2009
%E A164295 Edited by the Associate Editors of the OEIS, Aug 28 2009