cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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, 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, -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
Offset: 0

Views

Author

Alois P. Heinz, Aug 26 2019

Keywords

Examples

			Square array A(n,k) begins:
   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, ...
   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
  -1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, ...
   3, -2,  3,  3,  3,  3,  3,  3,  3,  3,  3, ...
   4, -1, -3,  4,  4,  4,  4,  4,  4,  4,  4, ...
   2,  5, -2, -4,  5,  5,  5,  5,  5,  5,  5, ...
  -3,  6, -1, -3, -5,  6,  6,  6,  6,  6,  6, ...
  -2,  7,  7, -2, -4, -6,  7,  7,  7,  7,  7, ...
  -4,  3,  8, -1, -3, -5, -7,  8,  8,  8,  8, ...
   9,  4,  9,  9, -2, -4, -6, -8,  9,  9,  9, ...
  10, 10, 10, 10, -1, -3, -5, -7, -9, 10, 10, ...
		

Crossrefs

Columns k=1-4 give: A117966, A309991, A309995, A316823.
A(n,n+1) gives A001477.
A(n+1,n) gives A001478 (for n>0).

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 0,
          (b-> b*A(iquo(n, b), k)+mods(n, b))(2*k+1))
        end:
    seq(seq(A(n, 1+d-n), n=0..d), d=0..14);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n == 0, 0, With[{b = 2k+1},
         b*A[Quotient[n, b], k] + Mod[n, b, -Quotient[b-1, 2]]]];
    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 *)

A316823 Balanced nonary enumeration (or balanced nonary representation) of integers; write n in nonary (base 9) and then replace 5's with (-4)'s, 6's with (-3)'s, 7's with (-2)'s, and 8's with (-1)'s.

Original entry on oeis.org

0, 1, 2, 3, 4, -4, -3, -2, -1, 9, 10, 11, 12, 13, 5, 6, 7, 8, 18, 19, 20, 21, 22, 14, 15, 16, 17, 27, 28, 29, 30, 31, 23, 24, 25, 26, 36, 37, 38, 39, 40, 32, 33, 34, 35, -36, -35, -34, -33, -32, -40, -39, -38, -37, -27, -26, -25, -24, -23, -31, -30, -29, -28
Offset: 0

Views

Author

Jackson Haselhorst, Aug 26 2019

Keywords

Examples

			Since 35_10=38_9, the digits of 35 in base 9 are 3 and 8. 8>4, so it is replaced with (-1). The digits are then 3 and -1, so a(35)=3*9^1+(-1)*9^0=27-1=26.
		

Crossrefs

Column k=4 of A319047.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          9*a(iquo(n, 9))+mods(n, 9))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 26 2019
  • PARI
    f(x) = if (x > 9/2, -(9-x), x);
    a(n) = subst(Pol(apply(x->f(x), digits(n, 9)), 'x), 'x, 9); \\ Michel Marcus, Aug 27 2019
Showing 1-2 of 2 results.