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!)
A168030 Variant of pendular triangle A118340. 2
1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Replaced the sums (f(a,b) = a + b) by the operators f(a,b) = a^2 -a*b + b^2 in the construction of triangle in A118340.
LINKS
FORMULA
From G. C. Greubel, Jan 12 2023: (Start)
T(n, k) = A118340(n, k) mod 2.
Sum_{k=0..n} T(n, k) = A168148(n). (End)
EXAMPLE
Triangle begins as:
1;
1, 0;
1, 1, 0;
1, 0, 1, 0;
1, 1, 0, 1, 0;
1, 0, 1, 1, 1, 0;
1, 1, 1, 0, 0, 1, 0;
1, 0, 0, 0, 0, 1, 1, 0;
1, 1, 0, 1, 1, 1, 0, 1, 0;
1, 0, 1, 0, 0, 1, 1, 1, 1, 0;
1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0;
MATHEMATICA
t[n_, k_, p_]:= t[n, k, p]= If[k<0 || k>n, 0, If[k==0, 1, If[n<=2*k, t[n, n-k-1, p] +p*t[n-1, k, p], t[n, n-k, p] +t[n-1, k, p]]]]; (* A118340 *)
T[n_, k_, p_]:= Mod[t[n, k, p], 2]; (* A168030 *)
Table[T[n, k, 1], {n, 0, 15}, {k, 0, n}]//Flatten (* G. C. Greubel, Jan 12 2023 *)
PROG
(Magma)
function t(n, k) // t = A118340
if k lt 0 or k gt n then return 0;
elif k eq 0 then return 1;
elif n gt 2*k then return t(n, n-k) + t(n-1, k);
else return t(n, n-k-1) + t(n-1, k);
end if; return t;
end function;
T:= func< n, k | t(n, k) mod 2 >; // A168030
[T(n, k): k in [0..n], n in [0..15]];
(SageMath)
@CachedFunction
def t(n, k): # t = A118340
if (k<0 or k>n): return 0
elif (k==0): return 1
elif (n>2*k): return t(n, n-k) + t(n-1, k)
else: return t(n, n-k-1) + t(n-1, k)
def A168030(n, k): return t(n, k)%2
flatten([[A168030(n, k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Jan 12 2023
CROSSREFS
Cf. A118340, A168148 (row sums).
Sequence in context: A190233 A143242 A136442 * A128431 A290452 A215200
KEYWORD
nonn,tabl
AUTHOR
Philippe Deléham, Nov 17 2009
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 April 25 12:33 EDT 2024. Contains 371969 sequences. (Running on oeis4.)