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.
%I A309828 #52 Mar 18 2023 16:27:32 %S A309828 25,49,1225,4489,112225,444889,11122225,44448889,816416329,1111222225, %T A309828 1451229025,3832476649,4444488889,111112222225,444444888889, %U A309828 10185602037121,11111122222225,44444448888889,46355849271169,997230019944601,1111111222222225,1231148024622961 %N A309828 Squares formed by concatenating k and 2*k+1. %C A309828 The sequence is infinite. The squares of the form 66...67^2 = 4..48..89 are terms. %C A309828 Another infinite family is the squares 33...35^2 = 1...122...25. - _Robert Israel_, Aug 20 2019 %D A309828 Ion Cucurezeanu, Perfect squares and cubes of integers, Ed. Gil, Zalău, (2007), ch. 4, p. 25, pr. 211, 212 (in Romanian). %H A309828 Chai Wah Wu, <a href="/A309828/b309828.txt">Table of n, a(n) for n = 1..286</a> %e A309828 5^2 = 25 = 2_(2 * 2 + 1); %e A309828 7^2 = 49 = 4_(2 * 4 + 1); %e A309828 35^2 = 1225 = 12_(2 * 12 + 1); %e A309828 61907^2 = 3832476649 = 38324_(2 * 38324 + 1). %p A309828 F:= proc(m) local x,X,A; %p A309828 X:= [numtheory:-rootsunity(2,10^m+2)]; %p A309828 A:= map(x -> (x^2-1)/(10^m+2), X); %p A309828 A:= sort(select(x -> 2*x+1>=10^(m-1) and 2*x+1<10^m, A)); %p A309828 op(map(x -> x*10^m+2*x+1, A)) %p A309828 end proc: %p A309828 subsop(1=NULL, [seq(F(m),m=1..10)]); # _Robert Israel_, Aug 20 2019 %t A309828 Select[Array[FromDigits@ Flatten@ IntegerDigits[{#, 2 # + 1}] &, 10^5], %t A309828 IntegerQ@ Sqrt@ # &] (* _Michael De Vlieger_, Aug 19 2019 *) %o A309828 (Magma) [a:n in [1..30000000]|IsSquare(a) where a is 10^(#Intseq(2*n+1))*n+2*n+1]; %o A309828 (Python) %o A309828 def Test(n): %o A309828 s = str(n) %o A309828 ps, ss = s[0:len(s)//2], s[len(s)//2:len(s)] %o A309828 return int(ss) == 2*int(ps)+1 and s[len(s)//2] != "0" %o A309828 n, a = 1, 4 %o A309828 while n < 23: %o A309828 if Test(a*a): %o A309828 print(n,a*a) %o A309828 n = n+1 %o A309828 a = a+1 # _A.H.M. Smeets_, Aug 19 2019 %o A309828 (Python) %o A309828 from itertools import count, islice %o A309828 from sympy.ntheory.primetest import is_square %o A309828 def A309828_gen(): # generator of terms %o A309828 return filter(is_square,(int(str(k)+str((k<<1)+1)) for k in count(1))) %o A309828 A309828_list = list(islice(A309828_gen(),20)) # _Chai Wah Wu_, Feb 20 2023 %Y A309828 Cf. A000290, A030466, A054215, A109344, A181719, A309808, A309809. %K A309828 nonn,base %O A309828 1,1 %A A309828 _Marius A. Burtea_, Aug 18 2019