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!)
A362090 a(n) = A328749(A362089(n)). 2
0, -1, 1, -2, -5, -3, 2, 3, 5, -4, -9, -7, -10, -21, -19, -6, -13, -11, 4, 7, 9, 6, 11, 13, 10, 19, 21, -8, -17, -15, -18, -37, -35, -14, -29, -27, -20, -41, -39, -42, -85, -83, -38, -77, -75, -12, -25, -23, -26, -53, -51, -22, -45, -43, 8, 15, 17, 14, 27, 29 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Every integer appears once in the sequence.
LINKS
EXAMPLE
For n = 5, the base-3 expansion of 5 is "12", so the base-3 expansion of A362089(5) is "102", and a(5) = -2^2 + 2^0 = -3.
PROG
(PARI) a(n) = { if (n==0, 0, n%3, 4*a(n\3) + (-1)^(n%3), 2*a(n/3)); }
(Python)
from gmpy2 import digits
def A362090(n): return sum((-(1<<i) if int(j)&1 else 1<<i) for i, j in enumerate(digits(n, 3).replace('1', '01').replace('2', '02')[::-1]) if j!='0') # Chai Wah Wu, Apr 12 2023
CROSSREFS
Sequence in context: A346265 A188923 A078375 * A065261 A130848 A222760
KEYWORD
sign,base
AUTHOR
Rémy Sigrist, Apr 08 2023
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 28 09:58 EDT 2024. Contains 372037 sequences. (Running on oeis4.)