OFFSET
1,1
COMMENTS
From Robert Israel, Aug 22 2023: (Start)
Numbers k = a*c-1 such that for some positive integers a,b,c,d,e we have
10^e + 1 = a*b
10^(e-1) <= c*d < 10^e
a*c + 6 = b*d.
Includes 10^k-6 for k >= 2. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
F:= proc(d) local R, t, alpha, beta, gamma, delta, B, C, n, m, i0, i, gamma0, delta0;
R:= NULL;
t:= 10^d+1;
for alpha in numtheory:-divisors(t) do
beta:= t/alpha;
if igcd(alpha, beta) > 1 then next fi;
delta0:= 6/beta mod alpha;
gamma0:= (beta*delta0-6)/alpha;
B:= 2*alpha*gamma0 + 6;
C:= gamma0*delta0 - 10^(d-1) - 7;
if C < 0 then i0:= 0 else i0:= ceil((-B + sqrt(B^2-4*t*C))/(2*t)) fi;
for i from i0 do
gamma:= gamma0 + i*beta;
delta:= delta0 + i*alpha;
m:= gamma*delta;
if m -7 >= 10^d then break fi;
if m - 7 >= 10^(d-1) then R:= R, alpha*gamma-1 fi;
od
od;
sort(convert({R}, list))
end proc:
seq(op(F(d)), d=1..10); # Robert Israel, Aug 22 2023
MATHEMATICA
a[n_] := Module[{solutions = {}, kvalues, e = 2}, While[Length[solutions] < n, sol = Solve[{a*b == 10^e + 1, 10^(e - 1) <= c*d < 10^e, a*c + 6 == b*d, a > 0, b > 0, c > 0, d > 0}, {a, b, c, d}, Integers]; kvalues = (a*c - 1) /. sol; solutions = Union[solutions, kvalues]; e++]; Take[solutions, n]]; a[26] (* Robert P. P. McKone, Aug 22 2023 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Giovanni Resta, Feb 06 2006
STATUS
approved