SQUARE ARRAY

Square arrays, each layer differs by 8.

Two ideas carry every square-array problem: a solid array’s total is the side squared, and in a hollow array neighbouring layers always differ by 8. This page handles both modes, giving the total, the outer layer and a per-layer breakdown with step-by-step reasoning, plus random practice questions.

Total64 people
Outer layer28 people
A solid array’s total is the side squared: 8 × 8 = 64.
The outer layer is 4 × (side − 1) = 4 × (8 − 1) = 28: the four corners are shared by two sides, hence the −1.
Check: adding the layers gives back the total 64.

一个空心方阵最外层每边 8 人,共 2 层,这个方阵一共有多少人?最外层有多少人?

Results will appear here

Everything runs locally in your browser

How to use

Solid mode: enter the side length to get the total and the outer layer. Hollow mode: enter the outer side and the number of layers to get the total, the outer layer and a per-layer breakdown. The two core formulas: solid total = side²; hollow total = outer side² − core side² (core side = outer side − 2 × layers). Remember “neighbouring layers differ by 8” — many questions use it to check the answer fast.

FAQ

Why is the outer layer 4 × (side − 1) rather than side × 4?

The four corners each belong to two sides: counting side × 4 double-counts the corners once each, so subtract the 4 duplicates — 4n − 4 = 4(n − 1).

Why do neighbouring layers differ by exactly 8?

Moving one layer inward, each side loses one person at each end — 2 per side, 8 per layer. The rule holds only for square layers, which makes it a handy answer check.

Is the number of layers limited?

Yes. k must satisfy 2k < the outer side a; otherwise the core side drops to zero or below and the array ceases to exist. The tool flags such inputs.

Is any data uploaded?

No. All solving and question generation run locally in the browser.

Further reading

觉得好用?Found it useful?