|
|
A268609
|
|
Record values in A004290.
|
|
2
|
|
|
1, 10, 111, 1110, 111111111, 1111111110, 11111111100, 111111111000, 111111111111111111, 1111111111111111110, 11111111111111111100, 111111111111111111000, 111111111111111111111111111, 1111111111111111111111111110, 11111111111111111111111111100, 111111111111111111111111111000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(18) is the first term that is neither a repunit nor the product of a repunit and a power of 10.
|
|
LINKS
|
|
|
EXAMPLE
|
1110 is a term because A004290(6) = 1110 and A004290(n) < 1110 for all n < 6, where A004290(n) is the least positive multiple of n that when written in base 10 uses only 0's and 1's.
|
|
MAPLE
|
local L, x, m, r, k, j;
for x from 2 to n-1 do L[0, x]:= 0 od:
L[0, 0]:= 1: L[0, 1]:= 1;
for m from 1 do
if L[m-1, (-10^m) mod n] = 1 then break fi;
L[m, 0]:= 1;
for k from 1 to n-1 do
L[m, k]:= max(L[m-1, k], L[m-1, k-10^m mod n])
od;
od;
r:= 10^m; k:= -10^m mod n;
for j from m-1 by -1 to 1 do
if L[j-1, k] = 0 then
r:= r + 10^j; k:= k - 10^j mod n;
fi
od;
if k = 1 then r:= r + 1 fi;
r
end proc:
count:= 0: m:= 0;
for n from 1 to 20000 do
if v > m then
count:= count+1;
A[count]:= v;
m:= v;
fi
od:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
a(1)=0 prepended to terms, b-file and Maple by Georg Fischer, Jun 24 2020
|
|
STATUS
|
approved
|
|
|
|