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.

A371031 Number of distinct integers resulting from adding an n-digit non-multiple of 10 and its reverse.

Original entry on oeis.org

9, 17, 170, 323, 3230, 6137, 61370, 116603, 1166030, 2215457
Offset: 1

Views

Author

César Eliud Lozada, Mar 08 2024

Keywords

Examples

			For n=2 there are 81 2-digit numbers not ending with 0: {11, 12, 13, ..., 99}. There are 17 distinct results when adding each of these to their reversal: {22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, 198}. Therefore a(2) = 17.
		

Crossrefs

Programs

  • Mathematica
    A371031[n_] :=
    Module[{nn, ss},
      nn = Select[Range[If[n == 1, 1, 10^(n - 1) + 1], 10^n - 1], Mod[#, 10] > 0 &];
      ss = Map[# + FromDigits[Reverse[IntegerDigits[#]]] &, nn];
      Return[CountDistinct[ss]]
    ];
    Map[A371031[#]&, Range[7]]

Formula

For n > 1, empirically a(n+1) = 10 a(n) if n even, 19 a(n) / 10 if n odd, and thus a(n+2) = 19 a(n). - Michael S. Branicky, Mar 31 2024

Extensions

a(9)-a(10) from Michael S. Branicky, Mar 30 2024