A340231 Numbers of the form m^2-4 and also equal to some k concatenated with k+1.
12, 45, 2021, 3132, 1456414565, 3823938240, 6991969920, 120395120396, 426436426437, 902596902597, 74780207478021, 90902209090221, 66713320846671332085, 81142640598114264060, 84822272598482227260, 99002509969900250997, 22443387868362244338786837, 24905771529642490577152965
Offset: 1
Examples
a(1) = 12 = 4^2-4 = 2*6. a(4) = 3132 = 56^2-4 = 54*58.
Programs
-
Mathematica
Select[Table[n 10^IntegerLength[n]+n+1,{n,10^6}],IntegerQ[Sqrt[#+4]]&] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, Dec 27 2022 *)
-
Python
def agen(): m = 4 while True: tstr = str(m*m-4) k = int(tstr[:len(tstr)//2]) if tstr == str(k) + str(k+1): yield(int(tstr)) m += 1 for an in agen(): print(an, end=", ") # Michael S. Branicky, Jan 02 2021
Extensions
a(13)-a(16) from Michael S. Branicky, Jan 02 2021
a(17)-a(18) from David A. Corneth, Jan 02 2021
Comments