[go: up one dir, main page]

login
A375087
Numbers added to cumulative correction term in order for prime numbers to resemble a recursive sequence.
0
0, 1, 0, 4, 2, 4, 2, 0, 8, 2, 4, 8, 2, 0, 4, 10, 2, 4, 8, 0, 4, 4, 2, 10, 10, 2, 4, 2, -8, 14, 12, 8, -2, 10, 6, 2, 8, 4, 4, 10, -2, 10, 8, 4, -6, 2, 20, 14, 2, 0, 8, -2, 6, 10, 6, 10, 2, 4, 8, -4, -2, 20, 16, 2, -8, 12, 10, 14, 8, 0, 2, 8, 8, 8, 4, 2, 10, 4, 2, 16, 2, 10
OFFSET
1,4
COMMENTS
At n=1, prime(n+2) = prime(n+1) + prime(n) but thereafter such a form must be reduced by a "correction" amount prime(n+2) = prime(n+1) + prime(n) - A096379(n), and the present sequence is how that correction changes.
FORMULA
a(n) = 2*prime(n+1) - prime(n+2) - prime(n-1), for n>=2.
a(n) = A096379(n) - A096379(n-1), for n>=2.
prime(n+2) = prime(n+1) + prime(n) - Sum_{i=1..n} a(i)
a(n) = prime(n+1) + prime(n) - prime(n+2) - Sum_{i=0..n-1} a(i).
EXAMPLE
For n = 1: a(1) = p_2 + p_1 - p_3 - (Sum_{i <= 0} a(i)) = p_2 + p_1 - p_3 ==> a(1) = 3 + 2 - 5 = 0 ==> a(1) = 0.
For n = 2: a(2) = p_3 + p_2 - p_4 - (Sum_{i <= 1} a(i)) = p_3 + p_2 - p_4 - a(1) ==> a(2) = 5 + 3 - 7 - 0 = 1 ==> a(2) = 1.
For n = 3: a(3) = p_4 + p_3 - p_5 - (Sum_{i <= 2} a(i)) = p_4 + p_3 - p_5 - (a(1) + a(2)) ==> a(3) = 7 + 5 - 11 - (0 + 1) = 0 ==> a(3) = 0.
PROG
(PARI) lista(nn) = my(va = vector(nn)); for (n=1, nn, va[n] = prime(n+1) + prime(n) - prime(n+2) - sum(i=1, n-1, va[i]); ); va; \\ Michel Marcus, Jul 30 2024
CROSSREFS
Cf. A096379 (partial sums), A066495 (indices of 0's).
Sequence in context: A179950 A016514 A224360 * A269592 A105256 A064127
KEYWORD
sign,easy
AUTHOR
Kaleb Williams, Jul 29 2024
STATUS
approved