{
  "index": "1993-B-3",
  "type": "NT",
  "tag": [
    "NT",
    "COMB"
  ],
  "difficulty": "",
  "question": "Two real numbers $x$ and $y$ are chosen at random in the interval (0,1)\nwith respect to the uniform distribution. What is the probability that\nthe closest integer to $x/y$ is even? Express the answer in the form\n$r+s\\pi$, where $r$ and $s$ are rational numbers.",
  "solution": "Solution. The probability that \\( x / y \\) is exactly half an odd integer is 0 , so we may safely ignore this possibility.\n\nThe closest integer to \\( \\frac{x}{y} \\) is even if and only if \\( 0<\\frac{x}{y}<\\frac{1}{2} \\) or \\( \\frac{4 n-1}{2}<\\frac{x}{y}<\\frac{4 n+1}{2} \\) for some integer \\( n \\geq 1 \\). The former occurs inside the triangle with vertices \\( (0,0),(0,1) \\), \\( \\left(\\frac{1}{2}, 1\\right) \\), whose area is \\( \\frac{1}{4} \\). The latter occurs inside the triangle \\( (0,0),\\left(1, \\frac{2}{4 n-1}\\right),\\left(1, \\frac{2}{4 n+1}\\right) \\), whose area is \\( \\frac{1}{4 n-1}-\\frac{1}{4 n+1} \\). These regions are shown in Figure 25.\n\nHence the total area is\n\\[\n\\frac{1}{4}+\\frac{1}{3}-\\frac{1}{5}+\\frac{1}{7}+\\cdots\n\\]\n\nComparing this with Leibniz's formula\n\\[\n\\frac{\\pi}{4}=1-\\frac{1}{3}+\\frac{1}{5}-\\frac{1}{7}+\\cdots\n\\]\nshows that the total area is \\( (5-\\pi) / 4 \\).",
  "vars": [
    "x",
    "y"
  ],
  "params": [
    "n",
    "r",
    "s"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "x": "randomx",
        "y": "randomy",
        "n": "posintn",
        "r": "ratcoeffr",
        "s": "ratcoeffs"
      },
      "question": "Two real numbers $randomx$ and $randomy$ are chosen at random in the interval (0,1)\nwith respect to the uniform distribution. What is the probability that\nthe closest integer to $randomx/randomy$ is even? Express the answer in the form\n$ratcoeffr+ratcoeffs\\pi$, where $ratcoeffr$ and $ratcoeffs$ are rational numbers.",
      "solution": "Solution. The probability that \\( randomx / randomy \\) is exactly half an odd integer is 0 , so we may safely ignore this possibility.\n\nThe closest integer to \\( \\frac{randomx}{randomy} \\) is even if and only if \\( 0<\\frac{randomx}{randomy}<\\frac{1}{2} \\) or \\( \\frac{4\\,posintn-1}{2}<\\frac{randomx}{randomy}<\\frac{4\\,posintn+1}{2} \\) for some integer \\( posintn \\geq 1 \\). The former occurs inside the triangle with vertices \\( (0,0),(0,1) \\), \\( \\left(\\frac{1}{2}, 1\\right) \\), whose area is \\( \\frac{1}{4} \\). The latter occurs inside the triangle \\( (0,0),\\left(1, \\frac{2}{4\\,posintn-1}\\right),\\left(1, \\frac{2}{4\\,posintn+1}\\right) \\), whose area is \\( \\frac{1}{4\\,posintn-1}-\\frac{1}{4\\,posintn+1} \\). These regions are shown in Figure 25.\n\nHence the total area is\n\\[\n\\frac{1}{4}+\\frac{1}{3}-\\frac{1}{5}+\\frac{1}{7}+\\cdots\n\\]\n\nComparing this with Leibniz's formula\n\\[\n\\frac{\\pi}{4}=1-\\frac{1}{3}+\\frac{1}{5}-\\frac{1}{7}+\\cdots\n\\]\nshows that the total area is \\( (5-\\pi) / 4 \\)."
    },
    "descriptive_long_confusing": {
      "map": {
        "x": "marshmallow",
        "y": "doorknob",
        "n": "chandelier",
        "r": "teacupholder",
        "s": "blueberries"
      },
      "question": "Two real numbers $marshmallow$ and $doorknob$ are chosen at random in the interval (0,1) with respect to the uniform distribution. What is the probability that the closest integer to $marshmallow/doorknob$ is even? Express the answer in the form $teacupholder+blueberries\\pi$, where $teacupholder$ and $blueberries$ are rational numbers.",
      "solution": "Solution. The probability that \\( marshmallow / doorknob \\) is exactly half an odd integer is 0, so we may safely ignore this possibility.\n\nThe closest integer to \\( \\frac{marshmallow}{doorknob} \\) is even if and only if \\( 0<\\frac{marshmallow}{doorknob}<\\frac{1}{2} \\) or \\( \\frac{4 chandelier-1}{2}<\\frac{marshmallow}{doorknob}<\\frac{4 chandelier+1}{2} \\) for some integer \\( chandelier \\geq 1 \\). The former occurs inside the triangle with vertices \\( (0,0),(0,1), \\left(\\frac{1}{2}, 1\\right) \\), whose area is \\( \\frac{1}{4} \\). The latter occurs inside the triangle \\( (0,0),\\left(1, \\frac{2}{4 chandelier-1}\\right),\\left(1, \\frac{2}{4 chandelier+1}\\right) \\), whose area is \\( \\frac{1}{4 chandelier-1}-\\frac{1}{4 chandelier+1} \\). These regions are shown in Figure 25.\n\nHence the total area is\n\\[\n\\frac{1}{4}+\\frac{1}{3}-\\frac{1}{5}+\\frac{1}{7}+\\cdots\n\\]\n\nComparing this with Leibniz's formula\n\\[\n\\frac{\\pi}{4}=1-\\frac{1}{3}+\\frac{1}{5}-\\frac{1}{7}+\\cdots\n\\]\nshows that the total area is \\( (5-\\pi) / 4 \\)."
    },
    "descriptive_long_misleading": {
      "map": {
        "x": "verticalcoordinate",
        "y": "horizontalcoordinate",
        "n": "continuousvalue",
        "r": "irrationalvalue",
        "s": "transcendental"
      },
      "question": "Two real numbers $verticalcoordinate$ and $horizontalcoordinate$ are chosen at random in the interval (0,1)\nwith respect to the uniform distribution. What is the probability that\nthe closest integer to $verticalcoordinate/horizontalcoordinate$ is even? Express the answer in the form\n$irrationalvalue+transcendental\\pi$, where irrationalvalue and transcendental are rational numbers.",
      "solution": "Solution. The probability that \\( verticalcoordinate / horizontalcoordinate \\) is exactly half an odd integer is 0 , so we may safely ignore this possibility.\n\nThe closest integer to \\( \\frac{verticalcoordinate}{horizontalcoordinate} \\) is even if and only if \\( 0<\\frac{verticalcoordinate}{horizontalcoordinate}<\\frac{1}{2} \\) or \\( \\frac{4 continuousvalue-1}{2}<\\frac{verticalcoordinate}{horizontalcoordinate}<\\frac{4 continuousvalue+1}{2} \\) for some integer \\( continuousvalue \\geq 1 \\). The former occurs inside the triangle with vertices \\( (0,0),(0,1) \\), \\( \\left(\\frac{1}{2}, 1\\right) \\), whose area is \\( \\frac{1}{4} \\). The latter occurs inside the triangle \\( (0,0),\\left(1, \\frac{2}{4 continuousvalue-1}\\right),\\left(1, \\frac{2}{4 continuousvalue+1}\\right) \\), whose area is \\( \\frac{1}{4 continuousvalue-1}-\\frac{1}{4 continuousvalue+1} \\). These regions are shown in Figure 25.\n\nHence the total area is\n\\[\n\\frac{1}{4}+\\frac{1}{3}-\\frac{1}{5}+\\frac{1}{7}+\\cdots\n\\]\n\nComparing this with Leibniz's formula\n\\[\n\\frac{\\pi}{4}=1-\\frac{1}{3}+\\frac{1}{5}-\\frac{1}{7}+\\cdots\n\\]\nshows that the total area is \\( (5-\\pi) / 4 \\)."
    },
    "garbled_string": {
      "map": {
        "x": "qzxwvtnp",
        "y": "hjgrksla",
        "n": "vmkqrsdu",
        "r": "pzldfgha",
        "s": "jbtrnkse"
      },
      "question": "Two real numbers $qzxwvtnp$ and $hjgrksla$ are chosen at random in the interval (0,1)\nwith respect to the uniform distribution. What is the probability that\nthe closest integer to $qzxwvtnp/hjgrksla$ is even? Express the answer in the form\n$pzldfgha+jbtrnkse\\pi$, where $pzldfgha$ and $jbtrnkse$ are rational numbers.",
      "solution": "Solution. The probability that \\( qzxwvtnp / hjgrksla \\) is exactly half an odd integer is 0 , so we may safely ignore this possibility.\n\nThe closest integer to \\( \\frac{qzxwvtnp}{hjgrksla} \\) is even if and only if \\( 0<\\frac{qzxwvtnp}{hjgrksla}<\\frac{1}{2} \\) or \\( \\frac{4 vmkqrsdu-1}{2}<\\frac{qzxwvtnp}{hjgrksla}<\\frac{4 vmkqrsdu+1}{2} \\) for some integer \\( vmkqrsdu \\geq 1 \\). The former occurs inside the triangle with vertices \\( (0,0),(0,1) \\), \\( \\left(\\frac{1}{2}, 1\\right) \\), whose area is \\( \\frac{1}{4} \\). The latter occurs inside the triangle \\( (0,0),\\left(1, \\frac{2}{4 vmkqrsdu-1}\\right),\\left(1, \\frac{2}{4 vmkqrsdu+1}\\right) \\), whose area is \\( \\frac{1}{4 vmkqrsdu-1}-\\frac{1}{4 vmkqrsdu+1} \\). These regions are shown in Figure 25.\n\nHence the total area is\n\\[\n\\frac{1}{4}+\\frac{1}{3}-\\frac{1}{5}+\\frac{1}{7}+\\cdots\n\\]\n\nComparing this with Leibniz's formula\n\\[\n\\frac{\\pi}{4}=1-\\frac{1}{3}+\\frac{1}{5}-\\frac{1}{7}+\\cdots\n\\]\nshows that the total area is \\( (5-\\pi) / 4 \\)."
    },
    "kernel_variant": {
      "question": "Fix an integer $k\\ge 2$. Two real numbers $x$ and $y$ are chosen independently and uniformly at random from the interval $(0,1)$.  \nLet  \n\n  $N(x,y)=\\displaystyle\\Bigl\\lfloor \\frac{x}{y}+\\frac12\\Bigr\\rfloor$  \n\nbe the (almost surely) unique integer that is closest to the ratio $x/y$.\n\n(a) Prove that the probability  \n\n  $P_k=\\Pr\\!\\bigl\\{\\,N(x,y)\\equiv 0\\pmod{k}\\bigr\\}$  \n\nadmits the closed form  \n\n  $\\boxed{\\,P_k=\\dfrac54-\\dfrac{\\pi}{2k}\\cot\\dfrac{\\pi}{2k}\\,}.$  \n\n(b) Specialise to $k=6$ and give $P_6$ both as an exact expression and to six decimal places.",
      "solution": "Throughout let $(x,y)$ be uniformly distributed in the unit square  \n$S: 0<x<1,\\;0<y<1$.\n\nStep 1 – Geometry of a single value of $N$  \nFor an integer $n\\ge 0$ the condition\n  $n-\\tfrac12<\\dfrac{x}{y}<n+\\tfrac12$\nis equivalent to  \n\n  $(n-\\tfrac12)y<x<(n+\\tfrac12)y.$  \nInside $S$ this cuts out a region $R_n$ whose shape, and hence area\n$A_n=\\lambda_2(R_n)$, depends on $n$.\n\n•  $n=0$:  The inequalities give the triangle with vertices  \n $(0,0),\\,(0,1),\\,(\\tfrac12,1)$, hence $A_0=\\dfrac14$.\n\n•  $n=1$:  The strip  \n $\\tfrac12y<x<\\tfrac32y$ reaches the right edge $x=1$,\n so $R_1$ is the union of two pieces (see figure below):\n\n  $A_1=\\int_{0}^{2/3}y\\,dy+\\int_{2/3}^{1}\\!\\bigl(1-\\tfrac12y\\bigr)dy\n  =\\frac12\\Bigl(\\frac23\\Bigr)^2+\\Bigl[y-\\frac{y^2}{4}\\Bigr]_{2/3}^{1}\n  =\\frac{5}{12}.$\n\n•  $n\\ge 2$:  Now $(n+\\tfrac12)y\\le 1$ whenever\n $y\\le\\dfrac1{n+\\tfrac12}$, so the whole strip fits inside $S$\n until that height and is truncated afterwards.  One computes exactly as\n above (but the upper integral ends at $y=\\dfrac1{n-\\tfrac12}$) and\n obtains\n\n  $A_n=\\dfrac1{2n-1}-\\dfrac1{2n+1}\\qquad(n\\ge 2).$\n\nHence  \n\n  $A_0=\\dfrac14,\\quad A_1=\\dfrac{5}{12},\\quad\n  A_n=\\dfrac1{2n-1}-\\dfrac1{2n+1}\\;(n\\ge 2).$\n\nRemark The frequently-quoted formula\n $\\dfrac1{2n-1}-\\dfrac1{2n+1}$ fails for $n=1$, so treating $n=1$\nseparately is essential for rigour (even though it will be irrelevant\nonce $k\\ge 2$).\n\nStep 2 – Probability that $N$ is a multiple of $k$  \nLet $S_k=\\{0,k,2k,\\dots\\}$.  Since $k\\ge 2$, $1\\notin S_k$ and only\n$A_0$ together with the $A_{m k}$ for $m\\ge 1$ contribute:\n\n  $P_k=A_0+\\sum_{m=1}^{\\infty}A_{mk}\n  =\\frac14+\\sum_{m=1}^{\\infty}\\Bigl(\\frac1{2km-1}-\\frac1{2km+1}\\Bigr).$ (1)\n\nStep 3 – Summing an alternating harmonic tail via the digamma function  \nSet $q=2k,\\;r=q-1,\\;s=q+1$ so that the summand in (1) is\n$1/(qm+r)-1/(qm+s)$.  \nFor positive integers $q$ and coprime $r,s$ one has  \n\n  $\\displaystyle\\sum_{m=0}^{\\infty}\\Bigl(\\frac1{qm+r}-\\frac1{qm+s}\\Bigr)\n  =\\frac1q\\bigl[\\psi\\!\\bigl(\\tfrac{s}{q}\\bigr)-\\psi\\!\\bigl(\\tfrac{r}{q}\\bigr)\\bigr],$  \n\nwhere $\\psi$ denotes the digamma function.  The individual series\n$\\sum 1/(qm+r)$ diverge, but their *difference* converges absolutely, so\nthis identity is legitimate.  Removing the $m=0$ summand and shifting\nthe index gives  \n\n  $\\displaystyle\\sum_{m=1}^{\\infty}\\Bigl(\\frac1{qm+r}-\\frac1{qm+s}\\Bigr)\n  =\\frac1q\\!\\Bigl[\\psi\\!\\bigl(1+\\tfrac{s}{q}\\bigr)-\\psi\\!\\bigl(1+\\tfrac{r}{q}\\bigr)\\Bigr].$\n\nWith $q=2k,\\;r=2k-1,\\;s=2k+1$ this becomes  \n\n  $\\sum_{m=1}^{\\infty}\\Bigl(\\frac1{2km-1}-\\frac1{2km+1}\\Bigr)\n  =\\frac1{2k}\\Bigl[\\psi\\!\\Bigl(1+\\frac1{2k}\\Bigr)-\\psi\\!\\Bigl(1-\\frac1{2k}\\Bigr)\\Bigr].$ (2)\n\nStep 4 – Evaluating the digamma difference  \nThe digamma shift and reflection formulas  \n\n  $\\psi(1+z)=\\psi(z)+\\dfrac1z,\\qquad\n  \\psi(1-z)-\\psi(z)=\\pi\\cot(\\pi z)$\n\nyield  \n\n  $\\psi\\!\\Bigl(1+\\frac1{2k}\\Bigr)-\\psi\\!\\Bigl(1-\\frac1{2k}\\Bigr)\n  =\\Bigl[\\psi\\!\\Bigl(\\frac1{2k}\\Bigr)+2k\\Bigr]\n  \\;-\\;\\Bigl[\\psi\\!\\Bigl(\\frac1{2k}\\Bigr)+\\pi\\cot\\!\\Bigl(\\frac{\\pi}{2k}\\Bigr)\\Bigr]\n  =2k-\\pi\\cot\\!\\Bigl(\\frac{\\pi}{2k}\\Bigr).$\n\nInsert this into (2) to obtain  \n\n  $\\displaystyle\\sum_{m=1}^{\\infty}\\Bigl(\\frac1{2km-1}-\\frac1{2km+1}\\Bigr)\n  =1-\\frac{\\pi}{2k}\\cot\\!\\Bigl(\\frac{\\pi}{2k}\\Bigr).$ (3)\n\nStep 5 – Closing the computation  \nCombining (1) with (3) we find  \n\n  $P_k=\\frac14+\\Bigl[\\,1-\\frac{\\pi}{2k}\\cot\\!\\bigl(\\frac{\\pi}{2k}\\bigr)\\Bigr]\n  =\\boxed{\\frac54-\\frac{\\pi}{2k}\\cot\\frac{\\pi}{2k}}.$\n\nStep 6 – Special case $k=6$  \nHere  \n\n  $P_6=\\frac54-\\frac{\\pi}{12}\\cot\\!\\Bigl(\\frac{\\pi}{12}\\Bigr).$\n\nSince $\\cot\\!\\bigl(\\tfrac{\\pi}{12}\\bigr)=2+\\sqrt3$,  \n\n  $P_6\n  =\\frac54-\\frac{\\pi}{12}\\bigl(2+\\sqrt3\\bigr)\n  =\\boxed{\\;\\dfrac54-\\dfrac{\\pi}{6}-\\dfrac{\\pi\\sqrt3}{12}\\;}. $\n\nNumerically, using $\\pi\\approx 3.1415926536$ and\n$\\sqrt3\\approx 1.7320508076$,\n\n  $P_6\\approx 0.272952.$",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.731302",
        "was_fixed": false,
        "difficulty_analysis": "•  The original problem required only a single fixed modulus (parity) and\nled to the classical Leibniz series for $\\pi$.\n•  The current kernel variant fixed the modulus at $3$; one still needs\nnothing beyond simple pattern matching of two terms.\n\nIn contrast, the enhanced variant  \n1. asks for an *arbitrary* modulus $k$, forcing the solver to attack the\ngeneral series instead of one special case;  \n2. demands familiarity with special functions (digamma), their shift and\nreflection formulas, and the ability to manipulate them;  \n3. obliges the solver to recognise and evaluate a non-trivial tail of a\nreciprocal arithmetic-progression series;  \n4. culminates in a closed formula involving both trigonometric and\ntranscendental constants, and then requires an explicit trigonometric\nevaluation for $k=6$.\n\nThese extra layers—parametrisation, analytic tools, and symbolic\nmanipulation—raise the intellectual and technical bar significantly above\nboth earlier versions."
      }
    },
    "original_kernel_variant": {
      "question": "Fix an integer $k\\ge 2$. Two real numbers $x$ and $y$ are chosen independently and uniformly at random from the interval $(0,1)$.  \nLet  \n\n  $N(x,y)=\\displaystyle\\Bigl\\lfloor \\frac{x}{y}+\\frac12\\Bigr\\rfloor$  \n\nbe the (almost surely) unique integer that is closest to the ratio $x/y$.\n\n(a) Prove that the probability  \n\n  $P_k=\\Pr\\!\\bigl\\{\\,N(x,y)\\equiv 0\\pmod{k}\\bigr\\}$  \n\nadmits the closed form  \n\n  $\\boxed{\\,P_k=\\dfrac54-\\dfrac{\\pi}{2k}\\cot\\dfrac{\\pi}{2k}\\,}.$  \n\n(b) Specialise to $k=6$ and give $P_6$ both as an exact expression and to six decimal places.",
      "solution": "Throughout let $(x,y)$ be uniformly distributed in the unit square  \n$S: 0<x<1,\\;0<y<1$.\n\nStep 1 – Geometry of a single value of $N$  \nFor an integer $n\\ge 0$ the condition\n  $n-\\tfrac12<\\dfrac{x}{y}<n+\\tfrac12$\nis equivalent to  \n\n  $(n-\\tfrac12)y<x<(n+\\tfrac12)y.$  \nInside $S$ this cuts out a region $R_n$ whose shape, and hence area\n$A_n=\\lambda_2(R_n)$, depends on $n$.\n\n•  $n=0$:  The inequalities give the triangle with vertices  \n $(0,0),\\,(0,1),\\,(\\tfrac12,1)$, hence $A_0=\\dfrac14$.\n\n•  $n=1$:  The strip  \n $\\tfrac12y<x<\\tfrac32y$ reaches the right edge $x=1$,\n so $R_1$ is the union of two pieces (see figure below):\n\n  $A_1=\\int_{0}^{2/3}y\\,dy+\\int_{2/3}^{1}\\!\\bigl(1-\\tfrac12y\\bigr)dy\n  =\\frac12\\Bigl(\\frac23\\Bigr)^2+\\Bigl[y-\\frac{y^2}{4}\\Bigr]_{2/3}^{1}\n  =\\frac{5}{12}.$\n\n•  $n\\ge 2$:  Now $(n+\\tfrac12)y\\le 1$ whenever\n $y\\le\\dfrac1{n+\\tfrac12}$, so the whole strip fits inside $S$\n until that height and is truncated afterwards.  One computes exactly as\n above (but the upper integral ends at $y=\\dfrac1{n-\\tfrac12}$) and\n obtains\n\n  $A_n=\\dfrac1{2n-1}-\\dfrac1{2n+1}\\qquad(n\\ge 2).$\n\nHence  \n\n  $A_0=\\dfrac14,\\quad A_1=\\dfrac{5}{12},\\quad\n  A_n=\\dfrac1{2n-1}-\\dfrac1{2n+1}\\;(n\\ge 2).$\n\nRemark The frequently-quoted formula\n $\\dfrac1{2n-1}-\\dfrac1{2n+1}$ fails for $n=1$, so treating $n=1$\nseparately is essential for rigour (even though it will be irrelevant\nonce $k\\ge 2$).\n\nStep 2 – Probability that $N$ is a multiple of $k$  \nLet $S_k=\\{0,k,2k,\\dots\\}$.  Since $k\\ge 2$, $1\\notin S_k$ and only\n$A_0$ together with the $A_{m k}$ for $m\\ge 1$ contribute:\n\n  $P_k=A_0+\\sum_{m=1}^{\\infty}A_{mk}\n  =\\frac14+\\sum_{m=1}^{\\infty}\\Bigl(\\frac1{2km-1}-\\frac1{2km+1}\\Bigr).$ (1)\n\nStep 3 – Summing an alternating harmonic tail via the digamma function  \nSet $q=2k,\\;r=q-1,\\;s=q+1$ so that the summand in (1) is\n$1/(qm+r)-1/(qm+s)$.  \nFor positive integers $q$ and coprime $r,s$ one has  \n\n  $\\displaystyle\\sum_{m=0}^{\\infty}\\Bigl(\\frac1{qm+r}-\\frac1{qm+s}\\Bigr)\n  =\\frac1q\\bigl[\\psi\\!\\bigl(\\tfrac{s}{q}\\bigr)-\\psi\\!\\bigl(\\tfrac{r}{q}\\bigr)\\bigr],$  \n\nwhere $\\psi$ denotes the digamma function.  The individual series\n$\\sum 1/(qm+r)$ diverge, but their *difference* converges absolutely, so\nthis identity is legitimate.  Removing the $m=0$ summand and shifting\nthe index gives  \n\n  $\\displaystyle\\sum_{m=1}^{\\infty}\\Bigl(\\frac1{qm+r}-\\frac1{qm+s}\\Bigr)\n  =\\frac1q\\!\\Bigl[\\psi\\!\\bigl(1+\\tfrac{s}{q}\\bigr)-\\psi\\!\\bigl(1+\\tfrac{r}{q}\\bigr)\\Bigr].$\n\nWith $q=2k,\\;r=2k-1,\\;s=2k+1$ this becomes  \n\n  $\\sum_{m=1}^{\\infty}\\Bigl(\\frac1{2km-1}-\\frac1{2km+1}\\Bigr)\n  =\\frac1{2k}\\Bigl[\\psi\\!\\Bigl(1+\\frac1{2k}\\Bigr)-\\psi\\!\\Bigl(1-\\frac1{2k}\\Bigr)\\Bigr].$ (2)\n\nStep 4 – Evaluating the digamma difference  \nThe digamma shift and reflection formulas  \n\n  $\\psi(1+z)=\\psi(z)+\\dfrac1z,\\qquad\n  \\psi(1-z)-\\psi(z)=\\pi\\cot(\\pi z)$\n\nyield  \n\n  $\\psi\\!\\Bigl(1+\\frac1{2k}\\Bigr)-\\psi\\!\\Bigl(1-\\frac1{2k}\\Bigr)\n  =\\Bigl[\\psi\\!\\Bigl(\\frac1{2k}\\Bigr)+2k\\Bigr]\n  \\;-\\;\\Bigl[\\psi\\!\\Bigl(\\frac1{2k}\\Bigr)+\\pi\\cot\\!\\Bigl(\\frac{\\pi}{2k}\\Bigr)\\Bigr]\n  =2k-\\pi\\cot\\!\\Bigl(\\frac{\\pi}{2k}\\Bigr).$\n\nInsert this into (2) to obtain  \n\n  $\\displaystyle\\sum_{m=1}^{\\infty}\\Bigl(\\frac1{2km-1}-\\frac1{2km+1}\\Bigr)\n  =1-\\frac{\\pi}{2k}\\cot\\!\\Bigl(\\frac{\\pi}{2k}\\Bigr).$ (3)\n\nStep 5 – Closing the computation  \nCombining (1) with (3) we find  \n\n  $P_k=\\frac14+\\Bigl[\\,1-\\frac{\\pi}{2k}\\cot\\!\\bigl(\\frac{\\pi}{2k}\\bigr)\\Bigr]\n  =\\boxed{\\frac54-\\frac{\\pi}{2k}\\cot\\frac{\\pi}{2k}}.$\n\nStep 6 – Special case $k=6$  \nHere  \n\n  $P_6=\\frac54-\\frac{\\pi}{12}\\cot\\!\\Bigl(\\frac{\\pi}{12}\\Bigr).$\n\nSince $\\cot\\!\\bigl(\\tfrac{\\pi}{12}\\bigr)=2+\\sqrt3$,  \n\n  $P_6\n  =\\frac54-\\frac{\\pi}{12}\\bigl(2+\\sqrt3\\bigr)\n  =\\boxed{\\;\\dfrac54-\\dfrac{\\pi}{6}-\\dfrac{\\pi\\sqrt3}{12}\\;}. $\n\nNumerically, using $\\pi\\approx 3.1415926536$ and\n$\\sqrt3\\approx 1.7320508076$,\n\n  $P_6\\approx 0.272952.$",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.568045",
        "was_fixed": false,
        "difficulty_analysis": "•  The original problem required only a single fixed modulus (parity) and\nled to the classical Leibniz series for $\\pi$.\n•  The current kernel variant fixed the modulus at $3$; one still needs\nnothing beyond simple pattern matching of two terms.\n\nIn contrast, the enhanced variant  \n1. asks for an *arbitrary* modulus $k$, forcing the solver to attack the\ngeneral series instead of one special case;  \n2. demands familiarity with special functions (digamma), their shift and\nreflection formulas, and the ability to manipulate them;  \n3. obliges the solver to recognise and evaluate a non-trivial tail of a\nreciprocal arithmetic-progression series;  \n4. culminates in a closed formula involving both trigonometric and\ntranscendental constants, and then requires an explicit trigonometric\nevaluation for $k=6$.\n\nThese extra layers—parametrisation, analytic tools, and symbolic\nmanipulation—raise the intellectual and technical bar significantly above\nboth earlier versions."
      }
    }
  },
  "checked": true,
  "problem_type": "calculation"
}