A115361 Inverse of matrix (1,x)-(x,x^2) (expressed in Riordan array notation).
1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1
Offset: 0
Examples
Triangle begins: 1; 1,1; 0,0,1; 1,1,0,1; 0,0,0,0,1; 0,0,1,0,0,1; 0,0,0,0,0,0,1; 1,1,0,1,0,0,0,1; 0,0,0,0,0,0,0,0,1; 0,0,0,0,1,0,0,0,0,1; 0,0,0,0,0,0,0,0,0,0,1;
Links
- Tilman Piesk, Illustration of first 32 rows.
Crossrefs
Programs
-
Maple
A115361 := proc(n,k) for j from 0 do if k+(2*j-1)*(k+1) > n then return 0 ; elif k+(2^j-1)*(k+1) = n then return 1 ; end if; end do; end proc: # R. J. Mathar, Jul 14 2012
-
Mathematica
(*recurrence*) Clear[t] t[1, 1] = 1; t[n_, k_] := t[n, k] = If[k == 1, Sum[t[n, k + i], {i, 1, 2 - 1}], If[Mod[n, k] == 0, t[n/k, 1], 0], 0] Flatten[Table[Table[t[n, k], {k, 1, n}], {n, 14}]] (* Mats Granvik, Jun 26 2014 *)
-
PARI
tabl(nn) = {T = matrix(nn, nn, n, k, n--; k--; if ((n==k), 1, if (n==2*k+1, -1, 0))); Ti = T^(-1); for (n=1, nn, for (k=1, n, print1(Ti[n, k], ", ");); print(););} \\ Michel Marcus, Mar 28 2015
-
PARI
A115361_row(n,v=vector(n))={until(bittest(n,0)||!n\=2,v[n]=1);v} \\ Yields the n-th row (of length n). - M. F. Hasler, May 13 2018
-
PARI
T(n,k)={if(n%k, 0, my(e=valuation(n/k,2)); n/k==1<
Andrew Howroyd, Aug 03 2018 -
Python
# translation of Maple code by R. J. Mathar def a115361(n, k): j = 0 while True: if k + (2*j - 1) * (k + 1) > n: return 0 elif k + (2**j - 1) * (k + 1) == n: return 1 else: j += 1 # Tilman Piesk, Jun 10 2025
Formula
Number triangle whose k-th column has g.f. x^k*sum{j>=0} x^((2^j-1)*(k+1)).
T(n,k) = A209229((n+1)/(k+1)) for k+1 divides n+1, T(n,k) = 0 otherwise. - Andrew Howroyd, Aug 05 2018
Comments