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.
%I A327270 #16 Dec 10 2024 20:25:43 %S A327270 10,13,14,15,16,17,18,19,90,100,101,102,103,104,105,106,107,108,109, %T A327270 133,132,131,130,137,138,139,207,208,209,144,143,142,141,140,149,306, %U A327270 307,308,309,155,154,153,152,151,150,260,370,408,409,166,165,164,163,162,161,160,270 %N A327270 The minimum number such that the concatenation of the absolute values of differences between adjacent digits of a(n) is n. Values of n which have no such a(n) are given as -1. %C A327270 This sequence gives the minimum value such that the concatenation of the absolute value of the differences between its adjacent digits give n. Some values of n have no ancestor, see A271639. These are given the value -1 in this sequence. %H A327270 Andrew Howroyd, <a href="/A327270/b327270.txt">Table of n, a(n) for n = 1..10000</a> %e A327270 a(1) = 10 as |1 - 0| = 1, and 10 is the smallest such number. %e A327270 a(9) = 90 as |9 - 0| = 9, and 90 is the smallest such number %e A327270 a(10) = 100 as |1 - 0| = 1, and |0 - 0| = 0, giving a concatenation of 10. 100 is the smallest such number. %e A327270 a(48) = 408 as |4 - 0| = 4 and |0 - 8| = 8, giving a concatenation of 48. 408 is the smallest such number. %t A327270 max = 60; seq = Table[-1, {max}]; count = 0; n = 1; While[count < max && n <= 10^(1 + Ceiling[Log10[max]]), index = FromDigits @ Abs @ Differences @ IntegerDigits[n]; If[index <= max && seq[[index]] < 0, count++; seq[[index]] = n]; n++]; seq (* _Amiram Eldar_, Nov 29 2019 *) %o A327270 (PARI) %o A327270 A327270(n)={ %o A327270 my(v=if(!n, [0], digits(n))); %o A327270 my(recurse(k,c) = if(k>#v, c, my(d=v[k],r=-1); %o A327270 if(d<=c, r=self()(k+1,c-d)); %o A327270 if(r<0 && c+d<=9, r=self()(k+1,c+d)); %o A327270 if(r<0, -1, r+10^(#v+1-k)*c)) ); %o A327270 my(r=-1, c=1); while(r<0&&c<=9, r=recurse(1,c); c++); r %o A327270 } \\ _Andrew Howroyd_, Dec 10 2024 %Y A327270 Cf. A271639, A040115. %K A327270 sign,base %O A327270 1,1 %A A327270 _Scott R. Shannon_, Nov 29 2019