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!)
A174600 T(n,k) = 1 if the sum of +-k..+-n with arbitrary signs never equals zero, = 0 otherwise (lower triangle) 1
1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
Triangle begins
1;
1, 1;
0, 1, 1;
0, 1, 1, 1;
1, 0, 1, 1, 1;
1, 0, 0, 1, 1, 1;
0, 1, 1, 0, 1, 1, 1;
0, 1, 1, 0, 0, 1, 1, 1;
1, 0, 0, 1, 1, 0, 1, 1, 1;
1, 0, 0, 1, 1, 1, 0, 1, 1, 1; ...
MATHEMATICA
t[n_, k_] := If[Mod[Floor[(n+1)/2], 2] != Mod[Floor[k/2], 2], 1, If[Mod[n-k, 2] == 0, If[k > ((n-k)/2)^2, 1, 0], 0]]; Flatten[Table[t[n, k], {n, 1, 15}, {k, 1, n}]][[;; 108]] (* Jean-François Alcover, Jul 11 2011, after awk program *)
PROG
(AWK)
{ for(n=1; n<10; n++)
for(k=1; k<=n; k++)
print ++i, T(n, k);
}
function T(n, k) {
if ( int((n+1)/2)%2 != int(k/2)%2 ) return 1;
else if ( (n-k)%2 == 0 ) {
if ( k > ((n-k)/2)^2 ) return 1;
else return 0;
}
else return 0;
}
(PARI)
T(n, k)=
{
if ( ((n+1)\2)%2 != (k\2)%2,
return(1);
, /* else */
if ( (n-k)%2 == 0,
if ( k > ((n-k)/2)^2, return(1), return(0) );
, /* else */
return(0);
);
);
}
{ for(n=1, 10, /* show triangle */
for(k=1, n,
print1(T(n, k), ", ");
);
print();
); }
CROSSREFS
Related to A063865.
Sequence in context: A145362 A261092 A285960 * A265186 A248392 A188318
KEYWORD
nonn,tabl
AUTHOR
R. H. Hardin Mar 23 2010, with formula and reference from Franklin T. Adams-Watters and Olivier Gérard, on the Sequence Fans Mailing list.
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 July 8 05:21 EDT 2024. Contains 374149 sequences. (Running on oeis4.)