OFFSET
0,2
COMMENTS
a(111) is the first unproven term (see zeros in linked a-file). - Michael S. Branicky, Apr 15 2026
From Chai Wah Wu, Apr 24 2026: (Start)
If a(n) = 0, then a(m*n) = 0 for all m.
If a(n) > 0, then a(n)*n is a number of the form (10^a*b+c)*10^d, where 1<=b,c<=9, d>=0 and a>=2. Since (10^a*b+c)*10^d == 0 (mod n), the existence of such a number can be determined by checking a finite number of values of a and d. In particular a < n+2, d < n suffices. When gcd(n,10) = 1, this can be reduced to d=0 and a<k+3, where k is the multiplicative order of 10 mod n.
This method can be used to show that a(111) = a(123) = a(159) = a(189) = a(239) = ... = 0. In particular, all the zeros in the a-file a395183_1.txt are correct except for the following cases with terms of more than 1000 digits.
a(3833) = (5*10^1441+9)/3833
a(5939) = (9*10^1461+5)/5939
a(6337) = (7*10^1161+5)/6337
a(6661) = (7*10^1125+8)/6661
a(6869) = (7*10^1944+9)/6869
a(6967) = (8*10^1780+5)/6967
a(7666) = (5*10^1442+90)/7666
a(7691) = (9*10^1427+5)/7691
a(8339) = (3*10^1444+8)/8339
a(8413) = (1*10^1439+9)/8413
a(8831) = (7*10^1564+8)/8831
a(8993) = (6*10^1274+5)/8993
a(9353) = (5*10^1112+6)/9353 (End)
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..110
Michael S. Branicky, Table of n, a(n) for n = 0..10000 (terms where a(n) has more than 1000 digits, if it exists, are entered as 0)
EXAMPLE
a(9) = 12 because 12*9 = 108 where we have a zero between two nonzero digits.
PROG
(Python)
from itertools import count
def bgen():
for L in count(3):
for d1 in range(1, 10):
base = d1*10**(L-1)
for i in range(L-2):
for d2 in range(1, 10):
yield base + d2*10**i
def a(n):
return next(m//n for m in bgen() if m%n == 0) if n else 0
print([a(n) for n in range(111)])
(Python)
from math import gcd
from itertools import product
from sympy import multiplicity, n_order
def A395183(n):
if n<2: return 101*n
m2, m5 = (~n & n-1).bit_length(), multiplicity(5, n)
k = n//5**m5>>m2
r = n_order(10, k) if k>1 else 1
if gcd(10, n)>1:
alist = [range(2, r+max(m2, m5)+2), range(1, 10), range(1, 10)]
for d in product(*alist):
for a in range(d[0]-1):
b = d[0]-a
if not (pow(10, b, n)*d[1]+d[2])*pow(10, a, n)%n:
return (10**b*d[1]+d[2])*10**a//n
else:
alist = [range(r), range(1, 10), range(1, 10)]
for d in product(*alist):
if not (pow(10, d[0], k)*d[1]+d[2])%k:
t = d[0]
if r<=2:
while t<2:
t += r
if t>1:
return (10**t*d[1]+d[2])//n
return 0 # Chai Wah Wu, Apr 24 2026
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michael S. Branicky and Ali Sada, Apr 15 2026
STATUS
approved
