cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A376890 Alternating sum of twin primes (A001097).

Original entry on oeis.org

3, -2, 5, -6, 7, -10, 9, -20, 11, -30, 13, -46, 15, -56, 17, -84, 19, -88, 21, -116, 23, -126, 25, -154, 27, -164, 29, -168, 31, -196, 33, -206, 35, -234, 37, -244, 39, -272, 41, -306, 43, -376, 45, -386, 47, -414, 49, -472, 51, -518, 53, -546, 55, -562, 57, -584, 59, -600, 61, -748
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 08 2024

Keywords

Crossrefs

Programs

  • Maple
    T1:= select(t -> isprime(t) and isprime(t+2), [seq(i,i=5..1000,6)]):
    T:= map(t -> (-t, t+2), T1): T:= [3,op(T)]:
    ListTools:-PartialSums(T); # Robert Israel, Nov 08 2024

Formula

a(n) = Sum_{k=1..n} (-1)^(k+1) * A001097(k).
a(2*n-1) = 2*n+1.