{
  "index": "2016-B-2",
  "type": "NT",
  "tag": [
    "NT",
    "ANA"
  ],
  "difficulty": "",
  "question": "Define a positive integer $n$ to be \\emph{squarish} if either $n$ is itself a perfect square or the distance from $n$ to the nearest perfect square is a perfect square. For example, 2016 is squarish, because the nearest perfect square to 2016 is $45^2 = 2025$ and $2025-2016=9$ is a perfect square. (Of the positive integers between 1 and 10, only 6 and 7 are not squarish.)\n\nFor a positive integer $N$, let $S(N)$ be the number of squarish integers between 1 and $N$,\ninclusive. Find positive constants $\\alpha$ and $\\beta$ such that\n\\[\n\\lim_{N \\to \\infty} \\frac{S(N)}{N^\\alpha} = \\beta,\n\\]\nor show that no such constants exist.",
  "solution": "We prove that the limit exists for $\\alpha = \\frac{3}{4}$, $\\beta =\\frac{4}{3}$. \n\nFor any given positive integer $n$, the integers which are closer to $n^2$ than to any other perfect square are the ones in the interval $[n^2 - n - 1, n^2 + n]$. The number of squarish numbers in this interval is $1 + \\lfloor \\sqrt{n-1} \\rfloor + \\lfloor \\sqrt{n} \\rfloor$.\nRoughly speaking, this means that \n\\[\nS(N) \\sim \\int_0^{\\sqrt{N}} 2 \\sqrt{x} \\,dx = \\frac{4}{3} N^{3/4}.\n\\]\nTo make this precise, we use the bounds $x-1 \\leq \\lfloor x \\rfloor \\leq x$,\nand the upper and lower Riemann sum estimates for the integral of $\\sqrt{x}$,\nto derive upper and lower bounds on $S(N)$:\n\\begin{align*}\nS(N) &\\geq \\sum_{n=1}^{\\lfloor \\sqrt{N} \\rfloor - 1} \n(2 \\sqrt{n-1}-1) \\\\\n&\\geq \\int_0^{\\lfloor \\sqrt{N} \\rfloor - 2} 2\\sqrt{x} \\,dx - \\sqrt{N} \\\\\n&\\geq \\frac{4}{3} (\\sqrt{N} - 3)^{3/2} - \\sqrt{N}\n\\end{align*}\n\n\\begin{align*}\nS(N) &\\leq \\sum_{n=1}^{\\lceil \\sqrt{N} \\rceil} (2 \\sqrt{n} + 1) \\\\\n&\\leq \\int_0^{\\lceil \\sqrt{N}\\rceil + 1} 2 \\sqrt{x}\\,dx  + \\sqrt{N} + 1\\\\\n&\\leq \\frac{4}{3} (\\sqrt{N} + 2)^{3/2} + \\sqrt{N} + 1.\n\\end{align*}\n\n\\noindent\n\\textbf{Remark:}\nJohn Rickert points out that when $N = n^4$, one can turn the previous estimates into exact calculations to obtain the formula\n\\[\nS(N) = \\frac{4}{3}\\left( n^3 + \\frac{n}{2} \\right) = \\frac{4}{3} N^{3/4} + \\frac{2}{3} N^{1/4}.\n\\]\nFor general $N$, one can then use the estimates\n\\begin{align*}\n\\frac{4}{3} (N-1)^{3/4} + \\frac{2}{3} (N-1)^{1/4}\n&\\leq\nS(\\lfloor N^{1/4} \\rfloor^4) \\\\\n&\\leq S(N) \\\\\n&\\leq S(\\lceil N^{1/4} \\rceil^4) \\\\\n&\\leq \\frac{4}{3} (N+1)^{3/4} + \\frac{2}{3} (N+1)^{1/4}\n\\end{align*}\nto obtain the desired limit.",
  "vars": [
    "n",
    "N",
    "S",
    "x"
  ],
  "params": [
    "\\\\alpha",
    "\\\\beta"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "n": "indexvar",
        "N": "limitvar",
        "S": "countfunc",
        "x": "dummyvar",
        "\\alpha": "alphaseed",
        "\\beta": "betacoeff"
      },
      "question": "Define a positive integer $indexvar$ to be \\emph{squarish} if either $indexvar$ is itself a perfect square or the distance from $indexvar$ to the nearest perfect square is a perfect square. For example, 2016 is squarish, because the nearest perfect square to 2016 is $45^2 = 2025$ and $2025-2016=9$ is a perfect square. (Of the positive integers between 1 and 10, only 6 and 7 are not squarish.)\n\nFor a positive integer $limitvar$, let $countfunc(limitvar)$ be the number of squarish integers between 1 and $limitvar$,\ninclusive. Find positive constants $alphaseed$ and $betacoeff$ such that\n\\[\n\\lim_{limitvar \\to \\infty} \\frac{countfunc(limitvar)}{limitvar^{alphaseed}} = betacoeff,\n\\]\nor show that no such constants exist.",
      "solution": "We prove that the limit exists for $alphaseed = \\frac{3}{4}$, $betacoeff =\\frac{4}{3}$. \n\nFor any given positive integer $indexvar$, the integers which are closer to $indexvar^2$ than to any other perfect square are the ones in the interval $[indexvar^2 - indexvar - 1, indexvar^2 + indexvar]$. The number of squarish numbers in this interval is $1 + \\lfloor \\sqrt{indexvar-1} \\rfloor + \\lfloor \\sqrt{indexvar} \\rfloor$.\nRoughly speaking, this means that \n\\[\ncountfunc(limitvar) \\sim \\int_0^{\\sqrt{limitvar}} 2 \\sqrt{dummyvar} \\,d dummyvar = \\frac{4}{3} limitvar^{3/4}.\n\\]\nTo make this precise, we use the bounds $dummyvar-1 \\leq \\lfloor dummyvar \\rfloor \\leq dummyvar$,\nand the upper and lower Riemann sum estimates for the integral of $\\sqrt{dummyvar}$,\nto derive upper and lower bounds on $countfunc(limitvar)$:\n\\begin{align*}\ncountfunc(limitvar) &\\geq \\sum_{indexvar=1}^{\\lfloor \\sqrt{limitvar} \\rfloor - 1} \n(2 \\sqrt{indexvar-1}-1) \\\\\n&\\geq \\int_0^{\\lfloor \\sqrt{limitvar} \\rfloor - 2} 2\\sqrt{dummyvar} \\,d dummyvar - \\sqrt{limitvar} \\\\\n&\\geq \\frac{4}{3} (\\sqrt{limitvar} - 3)^{3/2} - \\sqrt{limitvar}\n\\end{align*}\n\n\\begin{align*}\ncountfunc(limitvar) &\\leq \\sum_{indexvar=1}^{\\lceil \\sqrt{limitvar} \\rceil} (2 \\sqrt{indexvar} + 1) \\\\\n&\\leq \\int_0^{\\lceil \\sqrt{limitvar}\\rceil + 1} 2 \\sqrt{dummyvar}\\,d dummyvar  + \\sqrt{limitvar} + 1\\\\\n&\\leq \\frac{4}{3} (\\sqrt{limitvar} + 2)^{3/2} + \\sqrt{limitvar} + 1.\n\\end{align*}\n\n\\noindent\n\\textbf{Remark:}\nJohn Rickert points out that when $limitvar = indexvar^4$, one can turn the previous estimates into exact calculations to obtain the formula\n\\[\ncountfunc(limitvar) = \\frac{4}{3}\\left( indexvar^3 + \\frac{indexvar}{2} \\right) = \\frac{4}{3} limitvar^{3/4} + \\frac{2}{3} limitvar^{1/4}.\n\\]\nFor general $limitvar$, one can then use the estimates\n\\begin{align*}\n\\frac{4}{3} (limitvar-1)^{3/4} + \\frac{2}{3} (limitvar-1)^{1/4}\n&\\leq\ncountfunc(\\lfloor limitvar^{1/4} \\rfloor^4) \\\\\n&\\leq countfunc(limitvar) \\\\\n&\\leq countfunc(\\lceil limitvar^{1/4} \\rceil^4) \\\\\n&\\leq \\frac{4}{3} (limitvar+1)^{3/4} + \\frac{2}{3} (limitvar+1)^{1/4}\n\\end{align*}\nto obtain the desired limit."
    },
    "descriptive_long_confusing": {
      "map": {
        "n": "lighthouse",
        "N": "dinosaur",
        "S": "blueberry",
        "x": "mountain",
        "\\alpha": "watermelon",
        "\\beta": "pineapple"
      },
      "question": "Define a positive integer $lighthouse$ to be \\emph{squarish} if either $lighthouse$ is itself a perfect square or the distance from $lighthouse$ to the nearest perfect square is a perfect square. For example, 2016 is squarish, because the nearest perfect square to 2016 is $45^2 = 2025$ and $2025-2016=9$ is a perfect square. (Of the positive integers between 1 and 10, only 6 and 7 are not squarish.)\n\nFor a positive integer $dinosaur$, let $blueberry(dinosaur)$ be the number of squarish integers between 1 and $dinosaur$,\ninclusive. Find positive constants $watermelon$ and $pineapple$ such that\n\\[\n\\lim_{dinosaur \\to \\infty} \\frac{blueberry(dinosaur)}{dinosaur^{watermelon}} = pineapple,\n\\]\nor show that no such constants exist.",
      "solution": "We prove that the limit exists for $watermelon = \\frac{3}{4}$, $pineapple =\\frac{4}{3}$. \n\nFor any given positive integer $lighthouse$, the integers which are closer to $lighthouse^2$ than to any other perfect square are the ones in the interval $[lighthouse^2 - lighthouse - 1, lighthouse^2 + lighthouse]$. The number of squarish numbers in this interval is $1 + \\lfloor \\sqrt{lighthouse-1} \\rfloor + \\lfloor \\sqrt{lighthouse} \\rfloor$.\nRoughly speaking, this means that \n\\[\nblueberry(dinosaur) \\sim \\int_0^{\\sqrt{dinosaur}} 2 \\sqrt{mountain} \\,d mountain = \\frac{4}{3} dinosaur^{3/4}.\n\\]\nTo make this precise, we use the bounds $mountain-1 \\leq \\lfloor mountain \\rfloor \\leq mountain$,\nand the upper and lower Riemann sum estimates for the integral of $\\sqrt{mountain}$,\nto derive upper and lower bounds on $blueberry(dinosaur)$:\n\\begin{align*}\nblueberry(dinosaur) &\\geq \\sum_{lighthouse=1}^{\\lfloor \\sqrt{dinosaur} \\rfloor - 1} \n(2 \\sqrt{lighthouse-1}-1) \\\\\n&\\geq \\int_0^{\\lfloor \\sqrt{dinosaur} \\rfloor - 2} 2\\sqrt{mountain} \\,d mountain - \\sqrt{dinosaur} \\\\\n&\\geq \\frac{4}{3} (\\sqrt{dinosaur} - 3)^{3/2} - \\sqrt{dinosaur}\n\\end{align*}\n\n\\begin{align*}\nblueberry(dinosaur) &\\leq \\sum_{lighthouse=1}^{\\lceil \\sqrt{dinosaur} \\rceil} (2 \\sqrt{lighthouse} + 1) \\\\\n&\\leq \\int_0^{\\lceil \\sqrt{dinosaur}\\rceil + 1} 2 \\sqrt{mountain}\\,d mountain  + \\sqrt{dinosaur} + 1\\\\\n&\\leq \\frac{4}{3} (\\sqrt{dinosaur} + 2)^{3/2} + \\sqrt{dinosaur} + 1.\n\\end{align*}\n\n\\noindent\n\\textbf{Remark:}\nJohn Rickert points out that when $dinosaur = lighthouse^4$, one can turn the previous estimates into exact calculations to obtain the formula\n\\[\nblueberry(dinosaur) = \\frac{4}{3}\\left( lighthouse^3 + \\frac{lighthouse}{2} \\right) = \\frac{4}{3} dinosaur^{3/4} + \\frac{2}{3} dinosaur^{1/4}.\n\\]\nFor general $dinosaur$, one can then use the estimates\n\\begin{align*}\n\\frac{4}{3} (dinosaur-1)^{3/4} + \\frac{2}{3} (dinosaur-1)^{1/4}\n&\\leq\nblueberry(\\lfloor dinosaur^{1/4} \\rfloor^4) \\\\\n&\\leq blueberry(dinosaur) \\\\\n&\\leq blueberry(\\lceil dinosaur^{1/4} \\rceil^4) \\\\\n&\\leq \\frac{4}{3} (dinosaur+1)^{3/4} + \\frac{2}{3} (dinosaur+1)^{1/4}\n\\end{align*}\nto obtain the desired limit."
    },
    "descriptive_long_misleading": {
      "map": {
        "n": "giantcounter",
        "N": "infinitesummit",
        "S": "scarcitymeasure",
        "x": "fixedvalue",
        "\\alpha": "shrinkfactor",
        "\\beta": "voidconstant"
      },
      "question": "Define a positive integer $giantcounter$ to be \\emph{squarish} if either $giantcounter$ is itself a perfect square or the distance from $giantcounter$ to the nearest perfect square is a perfect square. For example, 2016 is squarish, because the nearest perfect square to 2016 is $45^2 = 2025$ and $2025-2016=9$ is a perfect square. (Of the positive integers between 1 and 10, only 6 and 7 are not squarish.)\n\nFor a positive integer $infinitesummit$, let $scarcitymeasure(infinitesummit)$ be the number of squarish integers between 1 and $infinitesummit$, inclusive. Find positive constants $shrinkfactor$ and $voidconstant$ such that\n\\[\n\\lim_{infinitesummit \\to \\infty} \\frac{scarcitymeasure(infinitesummit)}{infinitesummit^{shrinkfactor}} = voidconstant,\n\\]\nor show that no such constants exist.",
      "solution": "We prove that the limit exists for $shrinkfactor = \\frac{3}{4}$, $voidconstant =\\frac{4}{3}$. \n\nFor any given positive integer $giantcounter$, the integers which are closer to $giantcounter^2$ than to any other perfect square are the ones in the interval $[giantcounter^2 - giantcounter - 1, giantcounter^2 + giantcounter]$. The number of squarish numbers in this interval is $1 + \\lfloor \\sqrt{giantcounter-1} \\rfloor + \\lfloor \\sqrt{giantcounter} \\rfloor$.\nRoughly speaking, this means that \n\\[\nscarcitymeasure(infinitesummit) \\sim \\int_0^{\\sqrt{infinitesummit}} 2 \\sqrt{fixedvalue} \\,d fixedvalue = \\frac{4}{3} infinitesummit^{3/4}.\n\\]\nTo make this precise, we use the bounds $fixedvalue-1 \\leq \\lfloor fixedvalue \\rfloor \\leq fixedvalue$,\nand the upper and lower Riemann sum estimates for the integral of $\\sqrt{fixedvalue}$,\nto derive upper and lower bounds on $scarcitymeasure(infinitesummit)$:\n\\begin{align*}\nscarcitymeasure(infinitesummit) &\\geq \\sum_{giantcounter=1}^{\\lfloor \\sqrt{infinitesummit} \\rfloor - 1} \n(2 \\sqrt{giantcounter-1}-1) \\\\\n&\\geq \\int_0^{\\lfloor \\sqrt{infinitesummit} \\rfloor - 2} 2\\sqrt{fixedvalue} \\,d fixedvalue - \\sqrt{infinitesummit} \\\\\n&\\geq \\frac{4}{3} (\\sqrt{infinitesummit} - 3)^{3/2} - \\sqrt{infinitesummit}\n\\end{align*}\n\n\\begin{align*}\nscarcitymeasure(infinitesummit) &\\leq \\sum_{giantcounter=1}^{\\lceil \\sqrt{infinitesummit} \\rceil} (2 \\sqrt{giantcounter} + 1) \\\\\n&\\leq \\int_0^{\\lceil \\sqrt{infinitesummit}\\rceil + 1} 2 \\sqrt{fixedvalue}\\,d fixedvalue  + \\sqrt{infinitesummit} + 1\\\\\n&\\leq \\frac{4}{3} (\\sqrt{infinitesummit} + 2)^{3/2} + \\sqrt{infinitesummit} + 1.\n\\end{align*}\n\n\\noindent\n\\textbf{Remark:}\nJohn Rickert points out that when $infinitesummit = giantcounter^4$, one can turn the previous estimates into exact calculations to obtain the formula\n\\[\nscarcitymeasure(infinitesummit) = \\frac{4}{3}\\left( giantcounter^3 + \\frac{giantcounter}{2} \\right) = \\frac{4}{3} infinitesummit^{3/4} + \\frac{2}{3} infinitesummit^{1/4}.\n\\]\nFor general $infinitesummit$, one can then use the estimates\n\\begin{align*}\n\\frac{4}{3} (infinitesummit-1)^{3/4} + \\frac{2}{3} (infinitesummit-1)^{1/4}\n&\\leq\nscarcitymeasure(\\lfloor infinitesummit^{1/4} \\rfloor^4) \\\\\n&\\leq scarcitymeasure(infinitesummit) \\\\\n&\\leq scarcitymeasure(\\lceil infinitesummit^{1/4} \\rceil^4) \\\\\n&\\leq \\frac{4}{3} (infinitesummit+1)^{3/4} + \\frac{2}{3} (infinitesummit+1)^{1/4}\n\\end{align*}\nto obtain the desired limit."
    },
    "garbled_string": {
      "map": {
        "n": "qzxwvtnp",
        "N": "hjgrksla",
        "S": "vbklymre",
        "x": "ptnasljd",
        "\\alpha": "elqmwztr",
        "\\beta": "opsdkjfh"
      },
      "question": "Define a positive integer $qzxwvtnp$ to be \\emph{squarish} if either $qzxwvtnp$ is itself a perfect square or the distance from $qzxwvtnp$ to the nearest perfect square is a perfect square. For example, 2016 is squarish, because the nearest perfect square to 2016 is $45^2 = 2025$ and $2025-2016=9$ is a perfect square. (Of the positive integers between 1 and 10, only 6 and 7 are not squarish.)\n\nFor a positive integer $hjgrksla$, let $vbklymre(hjgrksla)$ be the number of squarish integers between 1 and $hjgrksla$,\ninclusive. Find positive constants $elqmwztr$ and $opsdkjfh$ such that\n\\[\n\\lim_{hjgrksla \\to \\infty} \\frac{vbklymre(hjgrksla)}{hjgrksla^{elqmwztr}} = opsdkjfh,\n\\]\nor show that no such constants exist.",
      "solution": "We prove that the limit exists for $elqmwztr = \\frac{3}{4}$, $opsdkjfh =\\frac{4}{3}$. \n\nFor any given positive integer $qzxwvtnp$, the integers which are closer to $qzxwvtnp^2$ than to any other perfect square are the ones in the interval $[qzxwvtnp^2 - qzxwvtnp - 1, qzxwvtnp^2 + qzxwvtnp]$. The number of squarish numbers in this interval is $1 + \\lfloor \\sqrt{qzxwvtnp-1} \\rfloor + \\lfloor \\sqrt{qzxwvtnp} \\rfloor$.\nRoughly speaking, this means that \n\\[\nvbklymre(hjgrksla) \\sim \\int_0^{\\sqrt{hjgrksla}} 2 \\sqrt{ptnasljd} \\,dptnasljd = \\frac{4}{3} hjgrksla^{3/4}.\n\\]\nTo make this precise, we use the bounds $ptnasljd-1 \\leq \\lfloor ptnasljd \\rfloor \\leq ptnasljd$,\nand the upper and lower Riemann sum estimates for the integral of $\\sqrt{ptnasljd}$,\nto derive upper and lower bounds on $vbklymre(hjgrksla)$:\n\\begin{align*}\nvbklymre(hjgrksla) &\\geq \\sum_{qzxwvtnp=1}^{\\lfloor \\sqrt{hjgrksla} \\rfloor - 1} \n(2 \\sqrt{qzxwvtnp-1}-1) \\\\\n&\\geq \\int_0^{\\lfloor \\sqrt{hjgrksla} \\rfloor - 2} 2\\sqrt{ptnasljd} \\,dptnasljd - \\sqrt{hjgrksla} \\\\\n&\\geq \\frac{4}{3} (\\sqrt{hjgrksla} - 3)^{3/2} - \\sqrt{hjgrksla}\n\\end{align*}\n\n\\begin{align*}\nvbklymre(hjgrksla) &\\leq \\sum_{qzxwvtnp=1}^{\\lceil \\sqrt{hjgrksla} \\rceil} (2 \\sqrt{qzxwvtnp} + 1) \\\\\n&\\leq \\int_0^{\\lceil \\sqrt{hjgrksla}\\rceil + 1} 2 \\sqrt{ptnasljd}\\,dptnasljd  + \\sqrt{hjgrksla} + 1\\\\\n&\\leq \\frac{4}{3} (\\sqrt{hjgrksla} + 2)^{3/2} + \\sqrt{hjgrksla} + 1.\n\\end{align*}\n\n\\noindent\n\\textbf{Remark:}\nJohn Rickert points out that when $hjgrksla = qzxwvtnp^4$, one can turn the previous estimates into exact calculations to obtain the formula\n\\[\nvbklymre(hjgrksla) = \\frac{4}{3}\\left( qzxwvtnp^3 + \\frac{qzxwvtnp}{2} \\right) = \\frac{4}{3} hjgrksla^{3/4} + \\frac{2}{3} hjgrksla^{1/4}.\n\\]\nFor general $hjgrksla$, one can then use the estimates\n\\begin{align*}\n\\frac{4}{3} (hjgrksla-1)^{3/4} + \\frac{2}{3} (hjgrksla-1)^{1/4}\n&\\leq\nvbklymre(\\lfloor hjgrksla^{1/4} \\rfloor^4) \\\\\n&\\leq vbklymre(hjgrksla) \\\\\n&\\leq vbklymre(\\lceil hjgrksla^{1/4} \\rceil^4) \\\\\n&\\leq \\frac{4}{3} (hjgrksla+1)^{3/4} + \\frac{2}{3} (hjgrksla+1)^{1/4}\n\\end{align*}\nto obtain the desired limit."
    },
    "kernel_variant": {
      "question": "Fix two integers   \n  r ≥ 2 and s ≥ 2.  \n\nCall a positive integer n an (r,s)–near–power if there is an integer m ≥ 0 such that  \n\n(i) n = m^r  (perfect r-th power), or  \n\n(ii) |n − m^r| = t^s for some integer t ≥ 1 and m^r is the NEAREST perfect r-th power to n  \n    (that is, |n − m^r| ≤ |n − ℓ^r| for every ℓ ≠ m; when the two nearest r-th powers are equidistant, the smaller power is taken to be the nearest one).  \n\nFor N ≥ 1 set  \n A_{r,s}(N) = #{ 1 ≤ n ≤ N : n is an (r,s)–near–power }.  \n\nDetermine positive constants α_{r,s} and β_{r,s} (depending only on r and s) such that  \n  lim_{N→∞} A_{r,s}(N) / N^{α_{r,s}} = β_{r,s},  \nor prove that no such pair exists.",
      "solution": "Throughout the proof every implied constant may depend on the fixed integers r , s ≥ 2.\n\n1.  Geometry of a single nearest–power block  \nFor m ≥ 1 let  \n L_m := (m^r − (m−1)^r)/2,  R_m := ((m+1)^r − m^r)/2.          (1)  \n\nThe set of positive integers whose nearest r-th power is m^r is the half-open interval  \n  J_m := ( m^r − L_m ,  m^r + R_m ] ,             (2)  \nwhich is left-open / right-closed so that the tie point m^r − L_m, where the two closest powers are equidistant, is assigned to the preceding block J_{m−1}; see the tie-breaking convention above.  \nThe blocks J_0 ,J_1 ,J_2 ,… are pairwise disjoint and their union is ℕ.\n\n2.  How many (r,s)–near–powers lie in J_m ?  \nInside J_m the distance d = |n − m^r| satisfies  \n  0 < d ≤ R_m  (to the right of m^r),  or  \n  0 < d ≤ L_m  (to the left of m^r),  \nand d is an s-th power exactly when d = t^s for some integer t ≥ 1.  \nWriting ⎣·⎦ for the floor function,\n\n F_m := # {n ∈ J_m : n is (r,s)–near–power}   \n   = 1                                       (the point n = m^r itself)  \n   + ⎣L_m^{1/s}⎦       (points left of m^r)  \n   + ⎣R_m^{1/s}⎦       (points right of m^r).                             (3)\n\n3.  Size of L_m and R_m  \nBy the binomial expansion  \n (m+1)^r − m^r = r m^{r−1} + O(m^{r−2}),  \n m^r − (m−1)^r = r m^{r−1} + O(m^{r−2}).  \nHence, from (1),\n\n R_m = (r/2) m^{r−1} + O(m^{r−2}),  \n L_m  = (r/2) m^{r−1} + O(m^{r−2}).                                (4)\n\nTaking s-th roots gives\n\n R_m^{1/s}, L_m^{1/s} = (r/2)^{1/s} m^{(r−1)/s} (1 + O(m^{−1})).     (5)\n\n4.  Main term for a single block  \nInsert (5) into (3).  Put  \n\n k := (r−1)/s > 0, C_{r,s} := 2 (r/2)^{1/s}.                     (6)\n\nBecause the two floors differ from the corresponding real numbers by at most 1,\n\n F_m = C_{r,s} m^{k} + O(1 + m^{k−1}).                            (7)\n\n(The term m^{k−1} only appears when k ≥ 1; if 0 < k < 1 the error O(1) dominates.)\n\n5.  Summing the blocks up to N  \nLet  \n\n M := ⌊N^{1/r}⌋.                                                  (8)\n\nIf 1 ≤ m ≤ M then J_m ⊂ (0,N], whereas for m = M+1 the block J_{M+1} may be cut off on the right.  Consequently\n\n A_{r,s}(N) = Σ_{m=1}^{M} F_m + O( F_{M+1} )                      (9)\n\nand by (7) the final incomplete block contributes O(M^{k}).\n\n6.  Evaluating the sum  \nFor any real κ > −1 one has\n\n Σ_{m≤M} m^{κ} = M^{κ+1}/(κ+1) + O(M^{κ}).                       (10)\n\nApply (10) with κ = k and κ = k−1 (when k ≥ 1); substituting (7) into (9) yields  \n\n A_{r,s}(N)  \n   = C_{r,s} · M^{k+1}/(k+1)  +  O( M^{max(k,1)} ).                (11)\n\n7.  The exponent α_{r,s}  \nReplace M by N^{1/r} using (8):  \n\n A_{r,s}(N) = (C_{r,s}/(k+1)) · N^{(k+1)/r} + O(N^{max(k,1)/r}).  \n\nBecause k>0 we have k+1 > max(k,1), so the error is of lower order and the limit exists.  Since  \n\n (k+1)/r = (1 + (r−1)/s)/r = (r + s − 1)/(r s),                 (12)\n\ndefine  \n\n α_{r,s} := (r + s − 1)/(r s).                                   (13)\n\n8.  The leading constant β_{r,s}  \nFrom (6) and (11),\n\n β_{r,s} = C_{r,s}/(k+1)  \n     = [2 (r/2)^{1/s}] / [1 + (r−1)/s]  \n     = (2s)/(r + s − 1) · (r/2)^{1/s}.                        (14)\n\n9.  Result  \nFor every pair (r,s) with r , s ≥ 2,\n\n α_{r,s} = (r + s − 1)/(r s),  β_{r,s} = (2s)/(r + s − 1) · (r/2)^{1/s},  \n\nand  \n\n lim_{N→∞}  A_{r,s}(N) / N^{α_{r,s}} = β_{r,s}.                 (15)\n\n10.  Classical check  \nFor (r,s) = (2,2) we obtain α_{2,2} = 3/4 and β_{2,2} = 4/3, in agreement with the customary “squarish’’ constants.\n\n11.  Technical remarks  \n•  The “boundaries’’ between blocks, i.e. the tie points m^r − L_m, are assigned to the lower block; there are only O(N^{1/r}) such points, which is o(N^{α_{r,s}}).  \n•  The block J_0 equals (0, R_0] and contributes O(1) elements.  \n•  All error estimates in (11) are absorbed in the term O(N^{max(k,1)/r}), which is strictly smaller than the main term exponent, guaranteeing the limit in (15).\n\nThis completes the proof.",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.843706",
        "was_fixed": false,
        "difficulty_analysis": "1.  Higher dimensions / more variables  \n   • The original problem involves two coinciding exponents (both equal to 2).  \n   • The enhanced version introduces two independent parameters $r$ and $s$, greatly enlarging the state space.\n\n2.  Additional constraints  \n   • Distances must now be $s^{\\text{th}}$ powers from $r^{\\text{th}}$ powers; analysing two different growth rates simultaneously is substantially subtler.\n\n3.  Deeper theory  \n   • Requires uniform control of gaps between consecutive $r^{\\text{th}}$ powers, binomial expansions, and uniform error estimates, then an application of the integral test for a general power sum.  \n   • One must prove existence of the limit for every $r,s$, not just identify a plausible exponent.\n\n4.  Multiple interacting concepts  \n   • Interaction between two power scales ($r^{\\text{th}}$ and $s^{\\text{th}}$) forces careful rescaling and summation across inter-dependent blocks.  \n   • The critical exponent arises from balancing these competing scales, demanding a more sophisticated asymptotic comparison than in the quadratic–only case.\n\nBecause of these new layers—the necessity to manage two independent parameters, carry uniform error bounds, and derive a closed-form constant valid for all $r,s$—the problem is markedly more intricate than both the original and the given kernel variant."
      }
    },
    "original_kernel_variant": {
      "question": "Fix two integers   \n  r ≥ 2 and s ≥ 2.  \n\nCall a positive integer n an (r,s)–near–power if there is an integer m ≥ 0 such that  \n\n(i) n = m^r  (perfect r-th power), or  \n\n(ii) |n − m^r| = t^s for some integer t ≥ 1 and m^r is the NEAREST perfect r-th power to n  \n    (that is, |n − m^r| ≤ |n − ℓ^r| for every ℓ ≠ m; when the two nearest r-th powers are equidistant, the smaller power is taken to be the nearest one).  \n\nFor N ≥ 1 set  \n A_{r,s}(N) = #{ 1 ≤ n ≤ N : n is an (r,s)–near–power }.  \n\nDetermine positive constants α_{r,s} and β_{r,s} (depending only on r and s) such that  \n  lim_{N→∞} A_{r,s}(N) / N^{α_{r,s}} = β_{r,s},  \nor prove that no such pair exists.",
      "solution": "Throughout the proof every implied constant may depend on the fixed integers r , s ≥ 2.\n\n1.  Geometry of a single nearest–power block  \nFor m ≥ 1 let  \n L_m := (m^r − (m−1)^r)/2,  R_m := ((m+1)^r − m^r)/2.          (1)  \n\nThe set of positive integers whose nearest r-th power is m^r is the half-open interval  \n  J_m := ( m^r − L_m ,  m^r + R_m ] ,             (2)  \nwhich is left-open / right-closed so that the tie point m^r − L_m, where the two closest powers are equidistant, is assigned to the preceding block J_{m−1}; see the tie-breaking convention above.  \nThe blocks J_0 ,J_1 ,J_2 ,… are pairwise disjoint and their union is ℕ.\n\n2.  How many (r,s)–near–powers lie in J_m ?  \nInside J_m the distance d = |n − m^r| satisfies  \n  0 < d ≤ R_m  (to the right of m^r),  or  \n  0 < d ≤ L_m  (to the left of m^r),  \nand d is an s-th power exactly when d = t^s for some integer t ≥ 1.  \nWriting ⎣·⎦ for the floor function,\n\n F_m := # {n ∈ J_m : n is (r,s)–near–power}   \n   = 1                                       (the point n = m^r itself)  \n   + ⎣L_m^{1/s}⎦       (points left of m^r)  \n   + ⎣R_m^{1/s}⎦       (points right of m^r).                             (3)\n\n3.  Size of L_m and R_m  \nBy the binomial expansion  \n (m+1)^r − m^r = r m^{r−1} + O(m^{r−2}),  \n m^r − (m−1)^r = r m^{r−1} + O(m^{r−2}).  \nHence, from (1),\n\n R_m = (r/2) m^{r−1} + O(m^{r−2}),  \n L_m  = (r/2) m^{r−1} + O(m^{r−2}).                                (4)\n\nTaking s-th roots gives\n\n R_m^{1/s}, L_m^{1/s} = (r/2)^{1/s} m^{(r−1)/s} (1 + O(m^{−1})).     (5)\n\n4.  Main term for a single block  \nInsert (5) into (3).  Put  \n\n k := (r−1)/s > 0, C_{r,s} := 2 (r/2)^{1/s}.                     (6)\n\nBecause the two floors differ from the corresponding real numbers by at most 1,\n\n F_m = C_{r,s} m^{k} + O(1 + m^{k−1}).                            (7)\n\n(The term m^{k−1} only appears when k ≥ 1; if 0 < k < 1 the error O(1) dominates.)\n\n5.  Summing the blocks up to N  \nLet  \n\n M := ⌊N^{1/r}⌋.                                                  (8)\n\nIf 1 ≤ m ≤ M then J_m ⊂ (0,N], whereas for m = M+1 the block J_{M+1} may be cut off on the right.  Consequently\n\n A_{r,s}(N) = Σ_{m=1}^{M} F_m + O( F_{M+1} )                      (9)\n\nand by (7) the final incomplete block contributes O(M^{k}).\n\n6.  Evaluating the sum  \nFor any real κ > −1 one has\n\n Σ_{m≤M} m^{κ} = M^{κ+1}/(κ+1) + O(M^{κ}).                       (10)\n\nApply (10) with κ = k and κ = k−1 (when k ≥ 1); substituting (7) into (9) yields  \n\n A_{r,s}(N)  \n   = C_{r,s} · M^{k+1}/(k+1)  +  O( M^{max(k,1)} ).                (11)\n\n7.  The exponent α_{r,s}  \nReplace M by N^{1/r} using (8):  \n\n A_{r,s}(N) = (C_{r,s}/(k+1)) · N^{(k+1)/r} + O(N^{max(k,1)/r}).  \n\nBecause k>0 we have k+1 > max(k,1), so the error is of lower order and the limit exists.  Since  \n\n (k+1)/r = (1 + (r−1)/s)/r = (r + s − 1)/(r s),                 (12)\n\ndefine  \n\n α_{r,s} := (r + s − 1)/(r s).                                   (13)\n\n8.  The leading constant β_{r,s}  \nFrom (6) and (11),\n\n β_{r,s} = C_{r,s}/(k+1)  \n     = [2 (r/2)^{1/s}] / [1 + (r−1)/s]  \n     = (2s)/(r + s − 1) · (r/2)^{1/s}.                        (14)\n\n9.  Result  \nFor every pair (r,s) with r , s ≥ 2,\n\n α_{r,s} = (r + s − 1)/(r s),  β_{r,s} = (2s)/(r + s − 1) · (r/2)^{1/s},  \n\nand  \n\n lim_{N→∞}  A_{r,s}(N) / N^{α_{r,s}} = β_{r,s}.                 (15)\n\n10.  Classical check  \nFor (r,s) = (2,2) we obtain α_{2,2} = 3/4 and β_{2,2} = 4/3, in agreement with the customary “squarish’’ constants.\n\n11.  Technical remarks  \n•  The “boundaries’’ between blocks, i.e. the tie points m^r − L_m, are assigned to the lower block; there are only O(N^{1/r}) such points, which is o(N^{α_{r,s}}).  \n•  The block J_0 equals (0, R_0] and contributes O(1) elements.  \n•  All error estimates in (11) are absorbed in the term O(N^{max(k,1)/r}), which is strictly smaller than the main term exponent, guaranteeing the limit in (15).\n\nThis completes the proof.",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.645937",
        "was_fixed": false,
        "difficulty_analysis": "1.  Higher dimensions / more variables  \n   • The original problem involves two coinciding exponents (both equal to 2).  \n   • The enhanced version introduces two independent parameters $r$ and $s$, greatly enlarging the state space.\n\n2.  Additional constraints  \n   • Distances must now be $s^{\\text{th}}$ powers from $r^{\\text{th}}$ powers; analysing two different growth rates simultaneously is substantially subtler.\n\n3.  Deeper theory  \n   • Requires uniform control of gaps between consecutive $r^{\\text{th}}$ powers, binomial expansions, and uniform error estimates, then an application of the integral test for a general power sum.  \n   • One must prove existence of the limit for every $r,s$, not just identify a plausible exponent.\n\n4.  Multiple interacting concepts  \n   • Interaction between two power scales ($r^{\\text{th}}$ and $s^{\\text{th}}$) forces careful rescaling and summation across inter-dependent blocks.  \n   • The critical exponent arises from balancing these competing scales, demanding a more sophisticated asymptotic comparison than in the quadratic–only case.\n\nBecause of these new layers—the necessity to manage two independent parameters, carry uniform error bounds, and derive a closed-form constant valid for all $r,s$—the problem is markedly more intricate than both the original and the given kernel variant."
      }
    }
  },
  "checked": true,
  "problem_type": "proof"
}