login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #23 Nov 24 2021 09:02:25

%S 11,24,39,146,255,366,479,684,891,11000,11121,11244,11369,11496,21525,

%T 21656,21789,31824,31961,42000,42141,42284,52329,52476,62525,62676,

%U 72729,72884,82941,93000,93161,103224,103389,113456,123525,123696,133769,143844,153921,164000

%N 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.

%C In short, write n in the middle of n^2.

%C Portions of this sequence are sometimes given as puzzles.

%D J. A. Reeds, Personal communication to _N. J. A. Sloane_, Jun 04 2016

%H Alois P. Heinz, <a href="/A274620/b274620.txt">Table of n, a(n) for n = 1..10000</a>

%e 4^2 = 16 so a(4) = 1.4.6 = 146.

%e 19^2 = 361 so a(19) = 3.19.61 = 31961.

%t nterms=100;Table[FromDigits[Flatten[Insert[d=IntegerDigits[n^2],IntegerDigits[n],Floor[Length[d]/2]+1]]],{n,nterms}] (* _Paolo Xausa_, Nov 24 2021 *)

%o (Python)

%o def a(n):

%o ss = str(n*n)

%o t = len(ss)//2

%o return int(ss[:t] + str(n) + ss[t:])

%o print([a(n) for n in range(1, 41)]) # _Michael S. Branicky_, Nov 24 2021

%Y Cf. A053061, A055436.

%K nonn,base

%O 1,1

%A _N. J. A. Sloane_, Jul 03 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)