What if memory wasn't fixed in neural networks or static matrices — but emerged from a recursive, chaotic shape?
Welcome to the Leonov sequence, a novel numerical recurrence that generates structured chaos with memory and serves as the core of wave-memory.
📐 The Formula
The sequence is defined recursively:
L_n = |a_n · L_{n-1} + b_n · L_{n-2} + c_n · L_{n-d_n} / (1 + n)|Where:
-
a_n, b_n, c_nare random coefficients in range[-2, 2] -
d_nis a random delay (1 to 10) -
L_0 = 1,L_1 = 1 - The
|·|ensures non-negative dynamics
This formula creates a dynamic, nonlinear, chaotic sequence with built-in decaying memory — unlike traditional sequences such as Fibonacci.
📊 Why Is It Interesting?
| Property | Leonov Sequence | Fibonacci | Logistic Map | Random Walk |
|---|---|---|---|---|
| Memory | ✅ Yes (d_n lag) | ❌ No | ❌ No | ❌ No |
| Chaos | ✅ Tunable | ❌ None | ✅ Full chaos | ✅ Noise |
| Entropy | 🟡 Moderate | 🔵 Low | 🔴 High | 🔴 High |
| Autocorrelation | ✅ Present | ✅ High | ❌ None | ✅ Random |
| Application | 🧠 Geometry, cognition | Math demo | Population models | Noise models |
🦀 Example in Rust
use wave_memory::{GeoForm, Wave};
fn main() {
// Create a geometric form using the Leonov sequence
let mut form = GeoForm::from_leonov(64, 123);
// Initialize a wave with an impulse at the center
let mut wave = Wave::new(64, 32);
// Run the wave and let the form adapt to its energy
for _ in 0..50 {
wave.step(&form);
let energy = wave.energy();
form.adapt(&energy, 0.1);
}
// Inspect a value from the adapted form
println!("Form at center: {:.4}", form.data[32]);
}🧠 Applications
- 🌀 Wave-based memory: used in
wave-memory - 🧱 Fractal form generation
- 🔬 Cognitive geometry
- 🌐 Emergent computation
This sequence is not just a generator — it’s a primitive architecture of form that adapts.