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 A355679 #10 Jul 18 2022 14:16:54 %S A355679 0,1,2,-1,4,-3,6,-5,-4,5,-2,3,12,-11,-10,11,-8,9,18,-17,-16,17,-14,15, %T A355679 24,-23,-22,23,-20,21,30,-29,-28,29,-26,27,-24,25,26,-25,28,-27,-18, %U A355679 19,20,-19,22,-21,-12,13,14,-13,16,-15,-6,7,8,-7,10,-9,60,-59 %N A355679 For any nonnegative number n with primorial base expansion Sum_{k >= 0} d_k * A002110(k), a(n) = Sum_{k >= 0} d_k * A002110(k) * (-1)^(Sum_{i < k} sign(d_i)). %C A355679 This sequence establishes a bijection from the nonnegative integers (N) to the integers (Z). %C A355679 This sequence is to primorial base what A065620 is to base 2. %C A355679 To compute a(n): write n as a minimal sum of terms of A060735 and take the alternating sum. %H A355679 Rémy Sigrist, <a href="/A355679/b355679.txt">Table of n, a(n) for n = 0..2310</a> %H A355679 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a> %F A355679 a(n) = n iff n = 0 or n belongs to A060735. %e A355679 For n = 13: %e A355679 13 = 2*6 + 1, %e A355679 so a(13) = -2*6 + 1 = -11. %o A355679 (PARI) a(n) = { my (v=0, f=1, s=1, d); forprime (r=2, oo, if (n==0, return (v), d=n%r; if (d, v+=d*f*s; s=-s); n\=r; f*=r)) } %Y A355679 Cf. A002110, A060735, A065620, A355678. %K A355679 sign,base %O A355679 0,3 %A A355679 _Rémy Sigrist_, Jul 14 2022