login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A120854 Matrix log of A117939, read by rows, consisting only of 0's, 3's and signed 2's. 3
0, 2, 0, 3, -2, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 3, -2, 0, 3, 0, 0, -2, 0, 0, 0, 0, 3, 0, 0, -2, 0, 2, 0, 0, 0, 3, 0, 0, -2, 3, -2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 3, -2, 0, 0, 0, 0, 0 (list; table; graph; refs; listen; history; internal format)
OFFSET

0,2

COMMENTS

The number of nonzero elements in row n equals A053735(n), the sum of ternary digits of n. Row sums are A120855(n) = 2*A062756 + A081603(n), where A062756(n) = number of 1's in ternary expansion of n and A081603(n) = number of 2's in ternary expansion of n. Triangle A117939 is related to partitions of n into powers of 3 and is the matrix square of A117947, where A117947(n,k) = balanced ternary digits of C(n,k) mod 3, also A117947(n,k) = L(C(n,k)/3) where L(j/p) is the Legendre symbol of j and p.

FORMULA

Ternary fractal, T(3*n,3*k) = T(n,k), defined by: T(n,k) = 0 if n<=k or when more than 1 digit differs between the ternary expansions of n and k; else T(n,k) = T(m,j) where the only ternary digits of n, k, that differ are m, j, respectively and T(1,0)=2, T(2,1)=-2, T(2,0)=3.

EXAMPLE

Triangle begins:

0;

2, 0;

3,-2, 0;

2, 0, 0, 0;

0, 2, 0, 2, 0;

0, 0, 2, 3,-2, 0;

3, 0, 0,-2, 0, 0, 0;

0, 3, 0, 0,-2, 0, 2, 0;

0, 0, 3, 0, 0,-2, 3,-2, 0;

2, 0, 0, 0, 0, 0, 0, 0, 0, 0; ...

Matrix exponentiation gives A117939:

1;

2, 1;

1,-2, 1;

2, 0, 0, 1;

4, 2, 0, 2, 1;

2,-4, 2, 1,-2, 1;

1, 0, 0,-2, 0, 0, 1;

2, 1, 0,-4,-2, 0, 2, 1;

1,-2, 1,-2, 4,-2, 1,-2, 1; ...

and A117939 is the matrix square of A117947:

1;

1, 1;

1,-1, 1;

1, 0, 0, 1;

1, 1, 0, 1, 1;

1,-1, 1, 1,-1, 1;

1, 0, 0,-1, 0, 0, 1;

1, 1, 0,-1,-1, 0, 1, 1;

1,-1, 1,-1, 1,-1, 1,-1, 1; ...

PROG

(PARI) /* Generated as the Matrix LOG of A117939: */ {T(n, k)=local(M=matrix(n+1, n+1, r, c, (binomial(r-1, c-1)+1)%3-1)^2, L=sum(i=1, #M, -(M^0-M)^i/i)); return(L[n+1, k+1])} (PARI) /* Generated as the Ternary Fractal: */ {T(n, k)=local(r=n, c=k, s=floor(log(n+1)/log(3))+1, u=vector(s), v=vector(s), d, e); if(n<=k, 0, if(n<3&k<3, [0, 0, 0; 2, 0, 0; 3, -2, 0][n+1, k+1], for(i=1, #u, u[i]=r%3; r=r\3); for(i=1, #v, v[i]=c%3; c=c\3); d=0; for(i=1, #v, if(u[i]!=v[i], d+=1; e=i)); if(d==1, T(u[e], v[e]), 0)))}

CROSSREFS

Cf. A117939, A117947; A120855 (row sums), A062756, A081603, A053735.

Sequence in context: A192421 A035223 A035184 * A035159 A103489 A127479

Adjacent sequences:  A120851 A120852 A120853 * A120855 A120856 A120857

KEYWORD

easy,sign,tabl

AUTHOR

Paul D. Hanna (pauldhanna(AT)juno.com), Jul 08 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 23:53 EST 2012. Contains 205689 sequences.