login
n times n+9 gives the concatenation of two numbers m and m+1.
5

%I #10 May 07 2024 14:49:44

%S 26,66,3416102887775247376839416334668635,

%T 3756559953325598880263233435801764,4313503800489302411917772257282208

%N n times n+9 gives the concatenation of two numbers m and m+1.

%H Robert Israel, <a href="/A116300/b116300.txt">Table of n, a(n) for n = 1..28</a>

%e 66 * 75 = 49//50, where // denotes concatenation.

%p F:= proc(d) local t, g, Cands:

%p t:= 10^d+1;

%p if NumberTheory:-QuadraticResidue(85,t) <> 1 then return NULL fi;

%p Cands:= map(s -> rhs(op(s)), [msolve(x^2 + 9*x - 1, t)]);

%p g:= proc(r) local v; v:= r^2 + 9*r - 1; v >= t*(t-11)/10 and v < t*(t-2) end proc;

%p op(sort(select(g, Cands)));

%p end proc:

%p map

%p map(F, [$1..82]); # _Robert Israel_, Aug 25 2023

%o (Python)

%o from itertools import count, islice

%o from sympy import sqrt_mod_iter

%o def A116300_gen(): # generator of terms

%o for l in count(1):

%o m = 10**l+1

%o k, r, dlist = m*(m-11)/10, m*(m-2), []

%o for a in sqrt_mod_iter(85,m):

%o d = ((a if a&1 else a+m)>>1)-4

%o if k<d*(d+9)<=r:

%o dlist.append(d)

%o yield from sorted(dlist)

%o A116300_list = list(islice(A116300_gen(),14)) # _Chai Wah Wu_, May 07 2024

%Y Cf. A116169, A116293, A116299, A116306.

%K nonn,base

%O 1,1

%A _Giovanni Resta_, Feb 06 2006