cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A274620 #23 Nov 24 2021 09:02:25
%S A274620 11,24,39,146,255,366,479,684,891,11000,11121,11244,11369,11496,21525,
%T A274620 21656,21789,31824,31961,42000,42141,42284,52329,52476,62525,62676,
%U A274620 72729,72884,82941,93000,93161,103224,103389,113456,123525,123696,133769,143844,153921,164000
%N 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.
%C A274620 In short, write n in the middle of n^2.
%C A274620 Portions of this sequence are sometimes given as puzzles.
%D A274620 J. A. Reeds, Personal communication to _N. J. A. Sloane_, Jun 04 2016
%H A274620 Alois P. Heinz, <a href="/A274620/b274620.txt">Table of n, a(n) for n = 1..10000</a>
%e A274620 4^2 = 16 so a(4) = 1.4.6 = 146.
%e A274620 19^2 = 361 so a(19) = 3.19.61 = 31961.
%t A274620 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 A274620 (Python)
%o A274620 def a(n):
%o A274620     ss = str(n*n)
%o A274620     t = len(ss)//2
%o A274620     return int(ss[:t] + str(n) + ss[t:])
%o A274620 print([a(n) for n in range(1, 41)]) # _Michael S. Branicky_, Nov 24 2021
%Y A274620 Cf. A053061, A055436.
%K A274620 nonn,base
%O A274620 1,1
%A A274620 _N. J. A. Sloane_, Jul 03 2016