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 A355678 #10 Jul 18 2022 14:16:49 %S A355678 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 A355678 24,-23,-22,23,-20,21,-18,19,20,-19,22,-21,-12,13,14,-13,16,-15,-6,7, %U A355678 8,-7,10,-9,48,-47,-46,47,-44,45,-42,43,44,-43,46,-45,-36,37 %N A355678 For any nonnegative number n with factorial base expansion Sum_{k > 0} d_k * k!, a(n) = Sum_{k > 0} d_k * k! * (-1)^(Sum_{i < k} sign(d_i)). %C A355678 This sequence establishes a bijection from the nonnegative integers (N) to the integers (Z). %C A355678 This sequence is to factorial base what A065620 is to base 2. %C A355678 To compute a(n): write n as a minimal sum of terms of A051683 and take the alternating sum. %H A355678 Rémy Sigrist, <a href="/A355678/b355678.txt">Table of n, a(n) for n = 0..5040</a> %H A355678 <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a> %F A355678 a(n) = n iff n = 0 or n belongs to A051683. %e A355678 For n = 28: %e A355678 28 = 4! + 2*2!, %e A355678 so a(28) = -4! + 2*2! = -20. %o A355678 (PARI) a(n) = { my (v=0, f=1, s=1, d); for (r=2, oo, if (n==0, return (v), d=n%r; if (d, v+=d*f*s; s=-s); n\=r; f*=r)) } %Y A355678 Cf. A051683, A065620, A355679. %K A355678 sign,base %O A355678 0,3 %A A355678 _Rémy Sigrist_, Jul 14 2022