# Zag numbers

A Neighborhood of Infinity finds the power series expansion of tan(x) (somehow related to Joyce trees and Tremolo permutations) using a cute cellular-automaton-like iteration.

Here's the Python code I used to try it out:

If you want to evaluate the exact automaton in my post that should be v=[1,0,1]. That'll fix the extraneous 1+.. -- Dan, aka sigfpe

I edited the post to change it from 1+tan(x) to tan(x) by starting with [0,1] instead of [1,1].

Here's the Python code I used to try it out:

**ETA:**ANoI's explanation### Comments:

**None**: tan(x) actually

**2006-03-14T21:41:26Z**

If you want to evaluate the exact automaton in my post that should be v=[1,0,1]. That'll fix the extraneous 1+.. -- Dan, aka sigfpe

**11011110**:

**11011110**:

**2006-03-15T01:07:00Z**

I edited the post to change it from 1+tan(x) to tan(x) by starting with [0,1] instead of [1,1].