login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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)). 2
0, 1, 2, -1, 4, -3, 6, -5, -4, 5, -2, 3, 12, -11, -10, 11, -8, 9, 18, -17, -16, 17, -14, 15, 24, -23, -22, 23, -20, 21, 30, -29, -28, 29, -26, 27, -24, 25, 26, -25, 28, -27, -18, 19, 20, -19, 22, -21, -12, 13, 14, -13, 16, -15, -6, 7, 8, -7, 10, -9, 60, -59 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
This sequence establishes a bijection from the nonnegative integers (N) to the integers (Z).
This sequence is to primorial base what A065620 is to base 2.
To compute a(n): write n as a minimal sum of terms of A060735 and take the alternating sum.
LINKS
FORMULA
a(n) = n iff n = 0 or n belongs to A060735.
EXAMPLE
For n = 13:
13 = 2*6 + 1,
so a(13) = -2*6 + 1 = -11.
PROG
(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)) }
CROSSREFS
Sequence in context: A345668 A076981 A355678 * A147965 A167542 A167419
KEYWORD
sign,base
AUTHOR
Rémy Sigrist, Jul 14 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)