A050810 From sequence A050782, the n's corresponding to the first occurrence of m (or 0 if not defined).
0, 1, 106, 37, 53, 103, 42, 23, 29, 19, 0, 56, 21, 38, 18, 35, 17, 16, 14, 26, 0, 12, 96, 43, 913, 2081, 812, 703, 754, 24, 0, 165, 726, 64, 603, 15, 592, 27, 13, 479, 0, 261, 541, 277, 48, 1129, 437, 649, 524, 538, 0, 291, 406, 1359, 533, 93, 377, 466, 1052, 279, 0
Offset: 0
Programs
-
Mathematica
nmax = 60; Clear[f]; f[max_] := f[max] = (r = Reap[For[n = 1, n <= max, n++, k = 1; If[IntegerQ[n/10], m = 0, While[k <= max && Reverse[id = IntegerDigits[k*n]] != id, k++]; m = k]; Sow[{n, m}]]][[2, 1]]; a[0] = 0; a[n_] := (s = Select[r, #[[2]] == n &, 1]; If[s == {}, 0, s[[1, 1]]]); Table[a[n], {n, 0, nmax}]); f[nmax]; f[max = 2 nmax]; While[Print["max = ", max]; f[max] != f[max/2], max = 2 max]; A050810 = f[max] (* Jean-François Alcover, Dec 31 2015 *)