login
Least number k of the form k = n*(k % 10) + [k / 10], where k % 10 = last digit of k, [k / 10] = k without its last digit.
3

%I #28 Jan 02 2023 12:30:52

%S 1,19,29,13,49,59,23,79,89,11,109,119,43,139,149,53,169,179,21,199,

%T 209,73,229,239,83,259,269,31,289,299,103,319,329,113,349,359,41,379,

%U 389,133,409,419,143,439,449,51,469,479,163,499,509,173,529,539,61

%N Least number k of the form k = n*(k % 10) + [k / 10], where k % 10 = last digit of k, [k / 10] = k without its last digit.

%C E. Angelini considered 3, 29, 289, 321, ... obtained by iteration of this map, while the lexicographic first nontrivial sequence obtained that way is 2, 19, 21, 209, 2089, 2321, 23209, 77363, 773629, ... See A268492, A268493 for these two sequences.

%H Colin Barker, <a href="/A268488/b268488.txt">Table of n, a(n) for n = 1..1000</a>

%H Eric Angelini (and reply by M. Hasler), <a href="http://list.seqfan.eu/oldermail/seqfan/2016-February/016113.html">3, 29, 289, 321, ...</a>, SeqFan list, Feb. 13, 2016

%H <a href="/index/Rec#order_18">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,-1).

%F G.f.: x*(1 +19*x +29*x^2 +13*x^3 +49*x^4 +59*x^5 +23*x^6 +79*x^7 +89*x^8 +9*x^9 +71*x^10 +61*x^11 +17*x^12 +41*x^13 +31*x^14 +7*x^15 +11*x^16 +x^17) / ((1 -x)^2*(1 +x +x^2)^2*(1 +x^3 +x^6)^2). - _Colin Barker_, Feb 15 2016 and Feb 22 2016

%F a(n) = 2*a(n-9)-a(n-18) for n>18. - _Colin Barker_, Feb 15 2016

%F a(n) = if n mod 9 == 1 then (n-1)/9*10+1 else if n mod 3 == 1 then (n-1)/3*10+3 else n*10-1, cf. SeqFan post for the proof. This implies the above recurrence relation and generating function. - _M. F. Hasler_, Feb 15 2016

%t Table[SelectFirst[Range@ 1000, # == n Mod[#, 10] + Floor[#/10] &], {n,

%t 55}] (* Version 10, or *)

%t Table[k = 1; While[k != n Mod[k, 10] + Floor[k/10], k++]; k, {n, 55}] (* _Michael De Vlieger_, Feb 15 2016 *)

%o (PARI) A268488(n)=if(n%9==1,n\9*10+1,if(n%3==1,n\3*10+3,n*10-1))

%o (PARI) a(n) = k=1; while(k != n*(k%10)+k\10, k++); k

%o vector(100, n, a(n)) \\ _Colin Barker_, Feb 15 2016

%o (PARI) Vec(x*(1 +19*x +29*x^2 +13*x^3 +49*x^4 +59*x^5 +23*x^6 +79*x^7 +89*x^8 +9*x^9 +71*x^10 +61*x^11 +17*x^12 +41*x^13 +31*x^14 +7*x^15 +11*x^16 +x^17) / ((1 -x)^2*(1 +x +x^2)^2*(1 +x^3 +x^6)^2) + O(x^40)) \\ _Colin Barker_, Feb 22 2016

%Y Cf. A268492 and A268493 for the orbits of 2 and 3 under this map.

%K nonn,base,easy

%O 1,2

%A _M. F. Hasler_, Feb 14 2016