login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A156297
Triangle T(n,k) read by rows. If n = k^2 then 1 else 0.
1
1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
1,1
COMMENTS
Triangle can be used as an operator.
EXAMPLE
Table begins:
1;
0,0;
0,0,0;
0,1,0,0;
0,0,0,0,0;
0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0,0;
0,0,1,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0;
PROG
(PARI)
up_to = 97461; \\ binomial(441+1, 2), 441 = 21^2
A156297tr(n, k) = ((k*k) == n);
A156297list(up_to) = { my(v = vector(up_to), i=0); for(n=1, oo, for(k=1, n, i++; if(i > up_to, return(v)); v[i] = A156297tr(n, k))); (v); };
v156297 = A156297list(up_to);
A156297(n) = v156297[n]; \\ Antti Karttunen, Dec 24 2018
CROSSREFS
Sequence in context: A354037 A185118 A240332 * A373483 A373372 A373143
KEYWORD
nonn,tabl
AUTHOR
Mats Granvik, Feb 07 2009
STATUS
approved