A340138 a(1)=0, a(n+1) = the least m not already in the sequence such that the decimal digital root r of a(n-1) is found somewhere among the decimal digits of m.
0, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19, 21, 23, 25, 27, 29, 20, 22, 24, 26, 28, 31, 34, 37, 41, 35, 38, 32, 45, 39, 30, 33, 36, 49, 40, 42, 46, 51, 56, 52, 47, 62, 48, 43, 57, 53, 58, 44, 68, 50, 54, 59, 55, 61, 67, 64, 71, 78, 60
Offset: 1
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Plot (n, a(n)) for 1 <= n <= 10^3 with records in dark red and least unused numbers in dark blue, with records of a(n)-n in red, many labeled, and records of n-a(n) in blue, many labeled.
- Michael De Vlieger, Logarithmic plot (n, a(n)-n) for 1 <= n <= 10^5 with records labeled in red, records of n-a(n) labeled in blue, and zeros plotted in black.
Programs
-
Mathematica
Block[{a = {0, 10}, k, r}, Do[k = 1; r = # + 9 Boole[# == 0] &@ Mod[a[[-1]], 9]; While[Nand[FreeQ[a, k], ! FreeQ[IntegerDigits[k], r]], k++]; AppendTo[a, k], 66]; a]
Comments