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!)
A317540 a(-1) = -1, a(0) = 1, a(n) = A317539(n) - 3*(n-1) for n > 0. 1
-1, 1, 2, 0, 2, 1, -1, 0, -1, 1, -1, 0, 2, 1, 2, 0, -1, 1, -1, 0, 2, 1, -1, 0, -1, 1, 2, 0, 2, 1, 2, 0, -1, 1, -1, 0, 2, 1, -1, 0, -1, 1, -1, 0, 2, 1, 2, 0, -1, 1, 2, 0, 2, 1, -1, 0, -1, 1, 2, 0, 2, 1, 2, 0, -1, 1, -1, 0, 2, 1, -1, 0, -1, 1, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
-1,3
LINKS
FORMULA
a(-1) = -1, a(1) = 2, a(4n) = 1, a(4n+2) = 0, a(8n+3) = 2, a(8n+7) = -1, a(8n+1) = a(4n+1), a(1) = 2, a(8n+5) = a(4n-1), for n >= 0.
PROG
(Python)
a = [-1, 1, 2]
print(-1, -1)
print(0, 1)
print(1, 2)
n = 2
while n < 128:
if n%4 == 0:
a = a+[1]
elif n%4 == 2:
a = a+[0]
elif n%8 == 1:
a = a+[a[4*(n//8)+2]]
elif n%8 == 3:
a = a+[2]
elif n%8 == 5:
a = a+[a[4*(n//8)]]
else: # n%8 == 7
a = a+[-1]
print(n, a[n+1])
n = n+1
CROSSREFS
Cf. A317539.
Sequence in context: A060950 A039976 A287267 * A133701 A230417 A287263
KEYWORD
sign
AUTHOR
A.H.M. Smeets, Jul 30 2018
EXTENSIONS
Offset and NAME corrected by R. J. Mathar, Jun 19 2021
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 July 13 12:04 EDT 2024. Contains 374282 sequences. (Running on oeis4.)