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 A352112 #9 Mar 08 2022 11:36:52 %S A352112 0,1,-2,-1,-4,-3,6,7,4,5,2,3,12,13,10,11,8,9,18,19,16,17,14,15,24,25, %T A352112 22,23,20,21,-30,-29,-32,-31,-34,-33,-24,-23,-26,-25,-28,-27,-18,-17, %U A352112 -20,-19,-22,-21,-12,-11,-14,-13,-16,-15,-6,-5,-8,-7,-10,-9,-60 %N A352112 In the primorial base expansion of n, replace each place value, say A002110(k) with k >= 0, by (-1)^k * A002110(k). %C A352112 This sequence maps natural numbers uniquely onto integers. %H A352112 Rémy Sigrist, <a href="/A352112/b352112.txt">Table of n, a(n) for n = 0..2309</a> (terms for n < 2*3*5*7*11) %H A352112 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a> %e A352112 For n = 42: %e A352112 - 42 = 1 * 5*3*2 + 2 * 3*2 + 0 * 2 + 0 * 1. %e A352112 - so a(42) = 1 * -5*3*2 + 2 * 3*2 + 0 * -2 + 0 * 1 = -18. %o A352112 (PARI) a(n) = { my (f=1, v=0); forprime (p=2, oo, if (n, v += f*(n%p); n\=p; f*=-p, return (v))) } %Y A352112 See A053985, A065369, A073835, A352111 for similar sequences. %Y A352112 Cf. A002110, A108731. %K A352112 sign,base %O A352112 0,3 %A A352112 _Rémy Sigrist_, Mar 05 2022