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.

A295821 Number of coprime pairs (a,b) with -n <= a <= n, -2 <= b <= 2.

Original entry on oeis.org

2, 12, 16, 24, 28, 36, 40, 48, 52, 60, 64, 72, 76, 84, 88, 96, 100, 108, 112, 120, 124, 132, 136, 144, 148, 156, 160, 168, 172, 180, 184, 192, 196, 204, 208, 216, 220, 228, 232, 240, 244, 252, 256, 264, 268, 276, 280, 288, 292, 300, 304, 312, 316, 324, 328
Offset: 0

Views

Author

Seiichi Manyama, Nov 28 2017

Keywords

Crossrefs

Column k=2 of A295782.

Programs

  • PARI
    a(n) = sum(x=-n, n, sum(y=-2, 2, gcd(x,y)==1)); \\ Michel Marcus, Jan 19 2025

Formula

From Alois P. Heinz, Jan 19 2025: (Start)
G.f.: -2*(x^3-x^2-5*x-1)/((x+1)*(x-1)^2).
a(n) = 2 * A047238(n+2) for n>=1. (End)
a(n) = 6*n + 5 - (-1)^n for n>=1. - Keagan Boyce, Jan 19 2025
Sum_{n>=0} (-1)^n/a(n) = 1/4 + Pi/(24*sqrt(3)) + log(3)/8. - Amiram Eldar, Jan 23 2025