OFFSET
1,2
COMMENTS
A018796 contains initial terms of rows. Subsidiary sequence: There can be a rearrangement of squares in groups so that the n-th group contains n squares beginning with n and not occurring earlier. E.g. the initial term of row 25 would be 256 and not 25.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10011 (first 141 rows, flattened)
EXAMPLE
Triangle begins:
1;
25, 225;
36, 324, 361;
4, 49, 400, 441;
529, 576, 5041, 5184, 5329;
...
MAPLE
g:= proc(n, d)
local i, r;
r:= ilog10(n)+1;
seq(i^2, i = ceil(sqrt(n*10^(d-r))) .. ceil(sqrt((n+1)*10^(d-r)))-1)
end proc:
f:= proc(n)
local R, count, v, d;
count:= 0; R:= NULL;
for d from 1 + ilog10(n) do
v:= g(n, d);
R:= R, v;
count:= count + nops([v]);
if count >= n then return R[1..n] fi
od
end proc:
f(1):= 1:
for i from 1 to 10 do f(i) od; # Robert Israel, Jan 28 2025
PROG
(PARI) row(n) = my(list=List(), k=1); while (#list != n, if (strsplit(Str(k^2), Str(n))[1] == "", listput(list, k^2)); k++); Vec(list); \\ Michel Marcus, Feb 08 2023
CROSSREFS
KEYWORD
AUTHOR
Amarnath Murthy, Nov 05 2002
EXTENSIONS
More terms from Michel Marcus, Feb 08 2023
STATUS
approved