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.

A368311 Symmetric array read by antidiagonals: A(n,k) is the number of sums with carries i + j with abs(i) <= n and abs(j) <= k.

Original entry on oeis.org

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, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0, 0, 1, 3, 6, 6, 6, 6, 6, 6, 6, 3, 1, 0, 0, 1, 3, 6, 10, 10, 10, 10, 10, 10, 6, 3, 1, 0
Offset: 0

Views

Author

Stefano Spezia, Dec 21 2023

Keywords

Examples

			Array begins:
  0, 0, 0, 0,  0,  0,  0,  0,  0,  0,  0,  0, ...
  0, 0, 0, 0,  0,  0,  0,  0,  0,  1,  1,  1, ...
  0, 0, 0, 0,  0,  0,  0,  0,  1,  3,  3,  3, ...
  0, 0, 0, 0,  0,  0,  0,  1,  3,  6,  6,  6, ...
  0, 0, 0, 0,  0,  0,  1,  3,  6, 10, 10, 10, ...
  0, 0, 0, 0,  0,  1,  3,  6, 10, 15, 15, 15, ...
  0, 0, 0, 0,  1,  3,  6, 10, 15, 21, 21, 21, ...
  0, 0, 0, 1,  3,  6, 10, 15, 21, 28, 28, 28, ...
  0, 0, 1, 3,  6, 10, 15, 21, 28, 36, 36, 36, ...
  0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 45, 46, ...
  0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 45, 46, ...
  0, 1, 3, 6, 10, 15, 21, 28, 36, 46, 46, 47, ...
  ...
A(6,5) = 3 since there are three sums with carries having addends almost equal to 6 and 5, respectively: 5 + 5 = 10, 6 + 4 = 10, and 6 + 5 = 11.
		

Crossrefs

Cf. A003056, A003991, A059692, A169894, A368310 (carryless sums).

Programs

  • Mathematica
    len[num_]:=Length[IntegerDigits[num]]; digit[num_, d_] := Part[IntegerDigits[num], d];  B[i_, j_] := Reverse[CoefficientList[Sum[digit[i, c]*x^(len[i]-c), {c, len[i]}]+Sum[digit[j, r]*x^(len[j]-r), {r, len[j]}], x]]; F[n_,k_] := Sum[Sum[Boole[Length[Select[B[i,j], #<10 &]] == IntegerLength[Max[i,j]]],{i,0,n}],{j,0,k}]; A[i_,j_]:=(i+1)(j+1)-F[i,j]; Table[A[i - j, j], {i, 0, 13}, {j, 0, i}]//Flatten

Formula

A(n,0) = A(0,n) = 0.
A(n,k) = A003991(n+1,k+1) - A368310(n,k).