# Zero the byte (eventually)

## Python 2, 39 bytes

```
f=lambda a,d,p=1:p%256and-~f(a+d,d,p*a)
```

Try it online!

Tracks the product `p`

of the arithmetic progression until it's divisible by 256.

## APL (Dyalog), 24 bytes

```
{0=256|×/⍵:≢⍵⋄⍺∇⍵,⍨⊃⍺+⍵}
```

Try it online!

`⍵`

is the the sequence (starting with the first item), `⍺`

the step.

`0=256|×/⍵`

- if the product is divisible by 256, `≢⍵`

return the length.

`⍺∇⍵`

- else, recurse, `,⍨⊃⍺+⍵`

- and append a new term to the sequence.

## Raku, ~~38~~ 31 bytes

```
{+($^a,*+$^b...{[*](@_)%%256})}
```

Try it online!

Does pretty much exactly what the description asks for. Generates the arithmetic sequence until the product of elements is divisible by 256 and returns the length of the list.