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!)
A214039 a(n) = a(n-1) - floor((a(n-2) + a(n-3))/2), with a(n)=n for n < 3. 2
0, 1, 2, 2, 1, -1, -2, -2, 0, 2, 3, 2, 0, -2, -3, -2, 1, 4, 5, 3, -1, -5, -6, -3, 3, 8, 8, 3, -5, -10, -9, -1, 9, 14, 10, -1, -13, -17, -10, 5, 19, 22, 10, -10, -26, -26, -8, 18, 35, 30, 4, -28, -45, -33, 4, 43, 58, 35, -15, -61, -71, -33, 33, 85, 85 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The same sequence, except few initial terms, for 23 of the 27 other seed triples satisfying -1 <= a(0,1,2) <= 1. The four exceptions are {-1,1,0}, {0,0,0}, {0,1,0}, {1,0,0} - all 0's after the seed triple. The sequence starting with {1,-1,0} has ten extra terms, the other 22 variants have between 1 and 9, except {1, 1, -1} which lacks 3 terms.
LINKS
MATHEMATICA
RecurrenceTable[{a[0]==0, a[1]==1, a[2]==2, a[n]==a[n-1]-Floor[(a[n-2] + a[n-3])/2]}, a[n], {n, 70}] (* Harvey P. Dale, Dec 03 2012 *)
PROG
(Python)
ppp =0
prpr=1
prev=2
for n in range(65):
cur = prev-(prpr+ppp)//2
print(str(ppp), end=', ')
ppp = prpr
prpr= prev
prev= cur
CROSSREFS
Sequence in context: A016429 A131852 A139352 * A089679 A290320 A348761
KEYWORD
sign,easy
AUTHOR
Alex Ratushnyak, Jul 01 2012
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 17 18:43 EDT 2024. Contains 371765 sequences. (Running on oeis4.)