nyy 发表于 2024-12-4 22:03:06

求坐标的通项公式,初一题!

如图,把自然数在坐标格点上排成一个方形螺旋,1在(0,0), 2在(1,0), 3在(1,1), ……,那么2004在_______.



答案(1,-22).

现在请求出通项公式,由坐标求n,或者由 n 求坐标。

nyy 发表于 2024-12-5 14:54:55

1,9,25,49等完全平方数都在一条直线上!

王守恩 发表于 2024-12-5 16:47:07

n, x, (1),a,b,(2), y, n,
01, 0,1, 1, 1, 1, 0,01,01=(0,0)
02, 1,3, 2, 1, 2, 0,02,
03, 1,4, 1, 2, 4, 1,03,03=(1,1)
04, 0,4, 0, 1, 5, 1,04,
05,-1,4, 0, 1, 6, 1,05,
06,-1,5, 1, 0, 6, 0,06,
07,-1,6, 1, 0, 6,-1,07,
08, 0,8, 2, 1, 7,-1,08,
09, 1,10, 2, 1, 8,-1,09,
10, 2,12, 2, 1, 9,-1,10,
11, 2,13, 1, 2,11, 0,11,
12, 2,14, 1, 2,13, 1,12,
13, 2,15, 1, 2,15, 2,13,
14, 1,15, 0, 1,16, 2,14,
15, 0,15, 0, 1,17, 2,15,
16,-1,15, 0, 1,18, 2,16,16=(-1,2)
17,-2,15, 0, 1,19, 2,17,
18,-2,16, 1, 0,19, 1,18,
19,-2,17, 1, 0,19, 0,19,
20,-2,18, 1, 0,19,-1,20,
......

a累加的和 = (1) = n + x
b累加的和 = (2) = n + y

a=1, 21, 0011, 222111, 00001111, 2222211111, 000000111111, 22222221111111, 0000000011111111,222222222111111111, 00000000001111111111, 2222222222211111111111, 000000000000111111111111, ...
b=1, 12, 1100, 111222, 11110000, 1111122222, 111111000000, 11111112222222, 1111111100000000,111111111222222222, 11111111110000000000, 1111111111122222222222, 111111111111000000000000, ...

Jack315 发表于 2024-12-5 20:00:07

2024 的坐标为 (21, -22) 。

王守恩 发表于 2024-12-6 06:36:32

n, x, a, b, y,
01, 0, 0, 0, 0,01=(0,0)
02, 1, +,0, 0,
03, 1, 0,+, 1,03=(1,1)
04, 0, -, 0, 1,
05,-1, -, 0, 1,
06,-1, 0, -, 0,
07,-1, 0, -, -1,
08, 0,+, 0, -1,
09, 1,+, 0, -1,
10, 2,+, 0, -1,
11, 2, 0, +, 0,
12, 2, 0, +, 1,
13, 2, 0, +, 2,
14, 1, -, 0, 2,
15, 0, -, 0, 2,
16,-1, -, 0, 2,16=(-1,2)
17,-2, -, 0, 2,
18,-2, 0, -, 1,
19,-2, 0, -, 0,
20,-2, 0, -, -1,
......

a累加的和 = x
b累加的和 = y

a=0, +0, - - 00, +++000, - - - - 0000, +++++00000, - - - - - - 000000, +++++++0000000, - - - - - - - - 00000000, +++++++++000000000, - - - - - - - - - - 0000000000, +++++++++++00000000000, ...
b=0, 0+, 00 - -, 000+++, 0000 - - - -, 00000+++++, 000000 - - - - - -, 0000000+++++++, 00000000 - - - - - - - -, 000000000+++++++++, 0000000000 - - - - - - - - - -, 00000000000+++++++++++, ...

nyy 发表于 2024-12-6 09:19:10

方形螺线关键角点的函数值

($x>0$)
右下角 `n(x,-x+1)=4x^2-4x+2`
右上角         `n(x,x)=4x^2-2x+1`
左上角      `n(-x,x)=4x^2+1`
左下角   `n(-x,-x)=4x^2+2x+1`
右下角左   `n(x,-x)=4x^2+4x+1`

例1:x=1时,五个值分别是2, 3, 5, 7, 9
例2:x=2时,五个值分别是10, 13, 17, 21, 25

王守恩 发表于 2024-12-6 14:26:29

拐点是这样一串数。1, 2, 3, 5, 7, 10, 13, 17, 21, 26, 31, 37, 43, 50, 57, 65, 73, 82, 91, 101, 111, 122, 133, 145, 157, 170, 183, 197, 211, 226, 241, 257, 273, 290, 307, 325, 343, 362, 381, 401, ...
Table, {n, 99}]

nyy 发表于 2024-12-6 14:27:34

nyy 发表于 2024-12-6 09:19
($x>0$)
右下角 `n(x,-x+1)=4x^2-4x+2`
右上角         `n(x,x)=4x^2-2x+1`

估计只能分段函数表示了

hujunhua 发表于 2024-12-6 14:42:57

根据楼上的角值,可以写出一个分段函数\[
n(x,y)=\begin{cases}4x^2+1+y-3x,&\text{if}&-x<y<x\\
4y^2+1-x-y,&\text{if}&-y≤x≤y\\
4x^2+1-x-y,&\text{if}&x≤y≤-x\\
4y^2+1+x-3y,&\text{if}&y≤x≤-y
\end{cases}\]
然后简并为\[
n(x,y)=4\max(x^2,y^2)+1-x-y+δ(2x-2y),δ(x,y)=\begin{cases}-1,&\text{if}&-x<y<x\\
1,&\text{if}&y≤x≤-y\\
0,&\text{if}&\text{otherwise}
\end{cases}\]

nyy 发表于 2024-12-6 14:54:23

hujunhua 发表于 2024-12-6 14:42
根据楼上的角值,可以写出一个分段函数\[
n(x,y)=\begin{cases}4x^2+1+y-3x,&\text{if}&-x ...

我觉得把图形看成一圈套圈这样,这样更有利于写出来。
页: [1] 2 3
查看完整版本: 求坐标的通项公式,初一题!