A129372 Triangle read by rows: T(n,k) = 1 if k divides n and n/k is odd, T(n,k) = 0 otherwise.
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, 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, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1
Examples
First few rows of the triangle: 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, 0, 1; 1, 0, 1, 0, 0, 0, 0, 0, 1; ...
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1275
Programs
-
Magma
A129372:= func< n,k | (n mod k) eq 0 and (Floor(n/k) mod 2) eq 1 select 1 else 0 >; [A129372(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Feb 01 2024
-
Mathematica
A129372[n_, k_]:= If[Mod[n,k]==0 && OddQ[n/k], 1, 0]; Table[A129372[n, k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Feb 01 2024 *)
-
PARI
T(n,k)=if(n%k, 0, n/k%2==1) \\ Andrew Howroyd, Aug 10 2018
-
SageMath
def A129372(n,k): return 1 if (n%k)==0 and ((n/k)%2)==1 else 0 flatten([[A129372(n,k) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Feb 01 2024
Formula
Extensions
Name changed and terms a(56) and beyond from Andrew Howroyd, Aug 10 2018