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 A061873 #10 Apr 16 2021 02:11:27 %S A061873 4,15,26,37,40,48,51,59,62,73,84,95,103,114,125,136,147,150,158,161, %T A061873 169,172,183,194,202,213,224,235,246,257,260,268,271,279,282,293,301, %U A061873 312,323,334,345,356,367,370,378,381,389,392,400,411,422,433,444,455 %N A061873 Numbers n such that |first digit - second digit + third digit - fourth digit ...| = 4. %C A061873 All terms == 4 or 7 (mod 11). - _Robert Israel_, Jun 03 2016 %H A061873 Robert Israel, <a href="/A061873/b061873.txt">Table of n, a(n) for n = 1..10000</a> %p A061873 F:= proc(n) option remember; %p A061873 -procname(floor(n/10)) + (n mod 10) %p A061873 end proc: %p A061873 for j from 0 to 9 do F(j):= j od: %p A061873 select(abs @ F = 4, [$1..1000]); # _Robert Israel_, Jun 03 2016 %t A061873 Do[ a = IntegerDigits[ n ]; l = Length[ a ]; e = o = {}; Do[ o = Append[ o, a[ [ 2k - 1 ] ] ], {k, 1, l/2 + .5} ]; Do[ e = Append[ e, a[ [ 2k ] ] ], {k, 1, l/2} ]; If[ Abs[ Apply[ Plus, o ] - Apply[ Plus, e ] ] == 4, Print[ n ] ], {n, 1, 1000} ] %o A061873 (Python) %o A061873 def ok(n): return abs(sum((-1)**i*int(d) for i, d in enumerate(str(n))))==4 %o A061873 print(list(filter(ok, range(456)))) # _Michael S. Branicky_, Apr 15 2021 %Y A061873 Cf. A008593, A060978-A060980, A060982, A061470-A061479, A061870-A061882. %K A061873 nonn,base,easy %O A061873 1,1 %A A061873 _Robert G. Wilson v_, May 10 2001