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!)
A319047 Square array A(n,k) where column k is balanced (2k+1)-ary enumeration of integers; n>=0, k>=1, read by antidiagonals. 5

%I #50 Feb 09 2021 06:50:51

%S 0,0,1,0,1,-1,0,1,2,3,0,1,2,-2,4,0,1,2,3,-1,2,0,1,2,3,-3,5,-3,0,1,2,3,

%T 4,-2,6,-2,0,1,2,3,4,-4,-1,7,-4,0,1,2,3,4,5,-3,7,3,9,0,1,2,3,4,5,-5,

%U -2,8,4,10,0,1,2,3,4,5,6,-4,-1,9,10,8,0,1,2,3,4,5,6,-6,-3,9,10,11,12

%N Square array A(n,k) where column k is balanced (2k+1)-ary enumeration of integers; n>=0, k>=1, read by antidiagonals.

%H Alois P. Heinz, <a href="/A319047/b319047.txt">Antidiagonals n = 0..200, flattened</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Balanced_ternary">Balanced ternary</a>

%e Square array A(n,k) begins:

%e 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...

%e 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ...

%e 3, -2, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...

%e 4, -1, -3, 4, 4, 4, 4, 4, 4, 4, 4, ...

%e 2, 5, -2, -4, 5, 5, 5, 5, 5, 5, 5, ...

%e -3, 6, -1, -3, -5, 6, 6, 6, 6, 6, 6, ...

%e -2, 7, 7, -2, -4, -6, 7, 7, 7, 7, 7, ...

%e -4, 3, 8, -1, -3, -5, -7, 8, 8, 8, 8, ...

%e 9, 4, 9, 9, -2, -4, -6, -8, 9, 9, 9, ...

%e 10, 10, 10, 10, -1, -3, -5, -7, -9, 10, 10, ...

%p A:= proc(n, k) option remember; `if`(n=0, 0,

%p (b-> b*A(iquo(n, b), k)+mods(n, b))(2*k+1))

%p end:

%p seq(seq(A(n, 1+d-n), n=0..d), d=0..14);

%t A[n_, k_] := A[n, k] = If[n == 0, 0, With[{b = 2k+1},

%t b*A[Quotient[n, b], k] + Mod[n, b, -Quotient[b-1, 2]]]];

%t Table[Table[A[n, 1+d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* _Jean-François Alcover_, Feb 09 2021, after _Alois P. Heinz_ *)

%Y Columns k=1-4 give: A117966, A309991, A309995, A316823.

%Y A(n,n+1) gives A001477.

%Y A(n+1,n) gives A001478 (for n>0).

%K sign,look,hear,tabl

%O 0,9

%A _Alois P. Heinz_, Aug 26 2019

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 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)