|
|
A274620
|
|
If n^2 has an even number of digits, write n after the left half of the digits of n^2 and before the right half, otherwise if n^2 has 2t+1 digits, write n after the first t digits of n^2 and before the last t+1 digits.
|
|
1
|
|
|
11, 24, 39, 146, 255, 366, 479, 684, 891, 11000, 11121, 11244, 11369, 11496, 21525, 21656, 21789, 31824, 31961, 42000, 42141, 42284, 52329, 52476, 62525, 62676, 72729, 72884, 82941, 93000, 93161, 103224, 103389, 113456, 123525, 123696, 133769, 143844, 153921, 164000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
In short, write n in the middle of n^2.
Portions of this sequence are sometimes given as puzzles.
|
|
REFERENCES
|
|
|
LINKS
|
|
|
EXAMPLE
|
4^2 = 16 so a(4) = 1.4.6 = 146.
19^2 = 361 so a(19) = 3.19.61 = 31961.
|
|
MATHEMATICA
|
nterms=100; Table[FromDigits[Flatten[Insert[d=IntegerDigits[n^2], IntegerDigits[n], Floor[Length[d]/2]+1]]], {n, nterms}] (* Paolo Xausa, Nov 24 2021 *)
|
|
PROG
|
(Python)
def a(n):
ss = str(n*n)
t = len(ss)//2
return int(ss[:t] + str(n) + ss[t:])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|