login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A330238 Triangle T(n,k): concatenate the absolute differences of the digits of n and k (the smaller one padded with leading zeros); n >= k >= 1. 3
0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 4, 3, 2, 1, 0, 5, 4, 3, 2, 1, 0, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1, 0, 11, 10, 11, 12, 13, 14, 15, 16, 17, 2, 1, 0, 12, 11, 10, 11, 12, 13, 14, 15, 16, 3, 2, 1, 0, 13, 12, 11, 10, 11, 12, 13, 14, 15, 4, 3, 2, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

A digit-wise analog of A049581.

The binary operator T: N x N -> N is commutative, so we need only the lower half of the symmetric square table A330238 or A330240 (including n, k = 0). Also, 0 is the neutral element: T(x,0) = x for all x, therefore we omit row & column 0. The trivial diagonal T(x,x) = 0 could also be omitted but serves as an end-of-row marker and makes indexing simpler and more natural.

LINKS

Table of n, a(n) for n=1..105.

Eric Angelini, The box ■ operation, personal blog "Cinquante signes", and post to the SeqFan list, Dec 06 2019.

EXAMPLE

The triangle starts as follows:

    n | k=1  2   3   4   5   6   7   8   9  10  11

   ---+-------------------------------------------

    1 |  0,

    2 |  1,  0,

    3 |  2,  1,  0,

    4 |  3,  2,  1,  0,

    5 |  4,  3,  2,  1,  0,

    6 |  5,  4,  3,  2,  1,  0,

    7 |  6,  5,  4,  3,  2,  1,  0,

    8 |  7,  6,  5,  4,  3,  2,  1,  0,

    9 |  8,  7,  6,  5,  4,  3,  2,  1,  0,

   10 | 11, 12, 13, 14, 15, 16, 17, 18, 19,  0,

   11 | 10, 11, 12, 13, 14, 15, 16, 17, 18,  1,  0,

   12 | 11, 10, 11, 12, 13, 14, 15, 16, 17,  2,  1,  0,

    (...)

PROG

(PARI) A330238(n, k)=fromdigits(digits(n)-abs(Vec(digits(k), -logint(n, 10)-1))) \\ see A330240 for a more general function not limited to 1 <= k <= n

CROSSREFS

Cf. A330237 (same as a square array read by antidiagonals), A330240 (idem, including row & column 0), A049581 (T(n,k) = |n-k|).

Sequence in context: A025660 A025677 A025651 * A025670 A122200 A025646

Adjacent sequences:  A330235 A330236 A330237 * A330239 A330240 A330241

KEYWORD

nonn,base

AUTHOR

M. F. Hasler, Dec 06 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 21:07 EDT 2020. Contains 337291 sequences. (Running on oeis4.)