login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #31 Jan 23 2025 03:54:46

%S 2,12,16,24,28,36,40,48,52,60,64,72,76,84,88,96,100,108,112,120,124,

%T 132,136,144,148,156,160,168,172,180,184,192,196,204,208,216,220,228,

%U 232,240,244,252,256,264,268,276,280,288,292,300,304,312,316,324,328

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

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).

%F From _Alois P. Heinz_, Jan 19 2025: (Start)

%F G.f.: -2*(x^3-x^2-5*x-1)/((x+1)*(x-1)^2).

%F a(n) = 2 * A047238(n+2) for n>=1. (End)

%F a(n) = 6*n + 5 - (-1)^n for n>=1. - _Keagan Boyce_, Jan 19 2025

%F Sum_{n>=0} (-1)^n/a(n) = 1/4 + Pi/(24*sqrt(3)) + log(3)/8. - _Amiram Eldar_, Jan 23 2025

%o (PARI) a(n) = sum(x=-n, n, sum(y=-2, 2, gcd(x,y)==1)); \\ _Michel Marcus_, Jan 19 2025

%Y Column k=2 of A295782.

%Y Cf. A047238, A137243.

%K nonn,easy,changed

%O 0,1

%A _Seiichi Manyama_, Nov 28 2017