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.

A129372 Triangle read by rows: T(n,k) = 1 if k divides n and n/k is odd, T(n,k) = 0 otherwise.

This page as a plain text file.
%I A129372 #12 Feb 01 2024 04:20:20
%S A129372 1,0,1,1,0,1,0,0,0,1,1,0,0,0,1,0,1,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,
%T A129372 0,1,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,
%U A129372 0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1
%N A129372 Triangle read by rows: T(n,k) = 1 if k divides n and n/k is odd, T(n,k) = 0 otherwise.
%H A129372 Andrew Howroyd, <a href="/A129372/b129372.txt">Table of n, a(n) for n = 1..1275</a>
%F A129372 Equals A051731 * A115359.
%F A129372 Sum_{k=1..n} T(n, k) = A001227(n) (row sums).
%F A129372 From _G. C. Greubel_, Feb 01 2024: (Start)
%F A129372 Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (-1)^(n-1)*A001227(n).
%F A129372 Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = A183063(n+1). (End)
%e A129372 First few rows of the triangle:
%e A129372   1;
%e A129372   0, 1;
%e A129372   1, 0, 1;
%e A129372   0, 0, 0, 1;
%e A129372   1, 0, 0, 0, 1;
%e A129372   0, 1, 0, 0, 0, 1;
%e A129372   1, 0, 0, 0, 0, 0, 1;
%e A129372   0, 0, 0, 0, 0, 0, 0, 1;
%e A129372   1, 0, 1, 0, 0, 0, 0, 0, 1;
%e A129372   ...
%t A129372 A129372[n_, k_]:= If[Mod[n,k]==0 && OddQ[n/k], 1, 0];
%t A129372 Table[A129372[n, k], {n,15}, {k,n}]//Flatten (* _G. C. Greubel_, Feb 01 2024 *)
%o A129372 (PARI) T(n,k)=if(n%k, 0, n/k%2==1) \\ _Andrew Howroyd_, Aug 10 2018
%o A129372 (Magma)
%o A129372 A129372:= func< n,k | (n mod k) eq 0 and (Floor(n/k) mod 2) eq 1 select 1 else 0 >;
%o A129372 [A129372(n,k): k in [1..n], n in [1..15]]; // _G. C. Greubel_, Feb 01 2024
%o A129372 (SageMath)
%o A129372 def A129372(n,k): return 1 if (n%k)==0 and ((n/k)%2)==1 else 0
%o A129372 flatten([[A129372(n,k) for k in range(1,n+1)] for n in range(1,16)]) # _G. C. Greubel_, Feb 01 2024
%Y A129372 Cf. A051731, A115359, A183063.
%Y A129372 Cf. A001227 (row sums).
%K A129372 nonn,tabl
%O A129372 1,1
%A A129372 _Gary W. Adamson_, Apr 11 2007
%E A129372 Name changed and terms a(56) and beyond from _Andrew Howroyd_, Aug 10 2018