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 A355675 #10 Jul 18 2022 14:16:45 %S A355675 0,1,2,3,4,5,6,7,8,9,10,-9,-8,-7,-6,-5,-4,-3,-2,-1,20,-19,-18,-17,-16, %T A355675 -15,-14,-13,-12,-11,30,-29,-28,-27,-26,-25,-24,-23,-22,-21,40,-39, %U A355675 -38,-37,-36,-35,-34,-33,-32,-31,50,-49,-48,-47,-46,-45,-44,-43,-42 %N A355675 a(0) = 0, and for any n > 0 and d = 1..9, a(10*n) = 10*a(n), a(10*n + d) = d - 10*a(n). %C A355675 This sequence establishes a bijection from the nonnegative integers (N) to the integers (Z). %C A355675 This sequence is to base 10 what A065620 is to base 2. %C A355675 To compute a(n): write n a sum of terms of A037124 with distinct 10-adic valuations and take the alternating sum. %C A355675 This sequence has similarities with A073835; they first differ in absolute value for n = 101: a(101) = 99 whereas A073835(101) = 101. %C A355675 This sequence has similarities with A334387; they first differ in absolute value for n = 111: a(111) = 91 whereas A334387(111) = 81. %H A355675 Rémy Sigrist, <a href="/A355675/b355675.txt">Table of n, a(n) for n = 0..10000</a> %H A355675 <a href="/index/De#decimal_expansion">Index entries for sequences related to decimal expansion of n</a> %F A355675 a(n) = 0 iff n = 0 or n belongs to A037124. %e A355675 For n = 17039: %e A355675 17039 = 10000 + 7000 + 30 + 9, %e A355675 so a(17039) = -10000 + 7000 - 30 + 9 = -3021. %o A355675 (PARI) a(n, base=10) = { my (d=digits(n, base), s=1); forstep (k=#d, 1, -1, if (d[k], d[k]*=s; s=-s)); return (fromdigits(d, base)) } %Y A355675 Cf. A037124, A065620, A073835, A334387, A355624. %K A355675 sign,base,easy %O A355675 0,3 %A A355675 _Rémy Sigrist_, Jul 14 2022