A sequence with primes and recursion.

21 views
Skip to first unread message

Dario Clavijo

unread,
Jul 22, 2026, 12:13:40 AMJul 22
to seq...@googlegroups.com
Hi everyone,

Good night,

Today a sequence came to my mind and I have been fiddling with it:

Sequence: a(1) = a(2) = 1 and a(n) = a(n-1)·a(n-2) if n is prime, else
a(n-1)+a(n-2).

Relationships:
a(n) = F(k+1) * a(p) + F(k) * a(p-1) where p = largest prime <= n, k =
n - p, and F is the Fibonacci function..
a(p+k) = F(k+1)·a(p) + F(k)·a(p-1) is true if and only if every index
p+1, p+2, ..., p+k is composite..

First 30 terms:
1, 1, 1, 2, 2, 4, 8, 12, 20, 32, 640, 672, 430080, 430752, 860832,
1291584, 1111836837888, 1111838129472, 1236182590115457219035136, ...

Key findings:
1. Not in OEIS the sequence is novel, (I searched for the terms and formulas).
2. Super exponential growth at each prime p, the digit count
approximately doubles (verified from p=13 onward, reaching exact x2.00
by p=29). This happens because a(p) = a(p-1)·a(p-2) ≈ a(p-1)^2.
3. Fibonacci multiplier between primes between consecutive primes p
and q with k composites between them:
a(q) ≈ F(k+2) * a(p)
where F is the Fibonacci sequence. Verified exactly for all prime gaps up to 50.
4. Not a standard arithmetic function a(n) depends on ALL previous
terms, not just n's factorization. The operation switches based on
primality of the index, making it fundamentally different from
multiplicative/additive functions.
5. Comparison with similar recurrences:
- Standard Fibonacci (always +): growth ~ phi^n.
- This sequence (+ and ×): super-exponential, digit doubling at primes
- Product-Fibonacci (always ×): double-exponential
This sequence sits between the two extremes mostly additive with
periodic multiplicative "jumps" at primes.

Do you think this is worth sending a draft?

Best
Darío
Reply all
Reply to author
Forward
0 new messages