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.

A321480 Zeroless analog of triangular numbers (version 2): a(0) = 0, and for any n > 0, a(n) = noz(1 + noz(2 + ... + noz((n-1) + n))), where noz(n) = A004719(n) omits the zeros from n.

Original entry on oeis.org

0, 1, 3, 6, 1, 15, 3, 28, 9, 18, 19, 39, 6, 28, 15, 12, 1, 9, 99, 37, 39, 177, 64, 69, 39, 19, 72, 99, 37, 12, 69, 64, 87, 12, 289, 27, 54, 82, 39, 42, 19, 6, 57, 37, 27, 54, 82, 12, 69, 64, 69, 12, 64, 27, 27, 82, 12, 87, 289, 69, 39, 289, 72, 99, 64, 57, 24
Offset: 0

Views

Author

Rémy Sigrist, Nov 11 2018

Keywords

Comments

This sequence is a variant of A243658 where the additions are carried in the opposite order; as (i, j) -> noz(i + j) is not associative in general we obtain another sequence.
This sequence is conjectured to be bounded. This could be explained by the fact that the zeros appearing in the last steps of the calculation (when adding small values) erode the number of digits of the intermediate sums.
The distinct values among the first 1000000 terms are: 0, 1, 3, 6, 9, 12, 15, 18, 19, 24, 27, 28, 37, 39, 42, 54, 57, 64, 69, 72, 82, 84, 87, 99, 177, 289.

Examples

			For n = 16:
- noz(15 + 16) = noz(31) = 31,
- noz(14 + 31) = noz(45) = 45,
- noz(13 + 45) = noz(58) = 58,
- noz(12 + 58) = noz(70) = 7,
- noz(11 + 7) = noz(18) = 18,
- noz(10 + 18) = noz(28) = 28,
- noz(9 + 28) = noz(37) = 37,
- noz(8 + 37) = noz(45) = 45,
- noz(7 + 45) = noz(52) = 52,
- noz(6 + 52) = noz(58) = 58,
- noz(5 + 58) = noz(63) = 63,
- noz(4 + 63) = noz(67) = 67,
- noz(3 + 67) = noz(70) = 7,
- noz(2 + 7) = noz(9) = 9,
- noz(1 + 9) = noz(10) = 1,
- hence a(16) = 1.
		

Crossrefs

Programs

  • Mathematica
    noz[n_] := FromDigits[DeleteCases[IntegerDigits[n], 0]];
    A321480[n_] := Block[{k = n}, Nest[noz[--k + #] &, n, Max[0, n-1]]];
    Array[A321480,100,0] (* Paolo Xausa, Apr 17 2024 *)
  • PARI
    a(n, base=10) = { my (t=n); forstep (k=n-1, 1, -1, t = fromdigits(select(sign, digits(t+k, base)), base)); t } \\ corrected by Rémy Sigrist, Apr 17 2024

Extensions

a(10), a(20), a(30), a(40), a(50) and a(60) corrected by Paolo Xausa, Apr 17 2024