login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A129372 Triangle read by rows: T(n,k) = 1 if k divides n and n/k is odd, T(n,k) = 0 otherwise. 8
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 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
Equals A051731 * A115359.
Sum_{k=1..n} T(n, k) = A001227(n) (row sums).
From G. C. Greubel, Feb 01 2024: (Start)
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (-1)^(n-1)*A001227(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = A183063(n+1). (End)
EXAMPLE
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;
...
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 *)
PROG
(PARI) T(n, k)=if(n%k, 0, n/k%2==1) \\ Andrew Howroyd, Aug 10 2018
(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
(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
CROSSREFS
Cf. A001227 (row sums).
Sequence in context: A102511 A266669 A129360 * A169591 A189295 A004539
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Apr 11 2007
EXTENSIONS
Name changed and terms a(56) and beyond from Andrew Howroyd, Aug 10 2018
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 01:57 EDT 2024. Contains 370952 sequences. (Running on oeis4.)