The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A358610 Numbers k such that the concatenation 1,2,3,... up to (k-1) is one less than a multiple of k. 1
1, 2, 4, 5, 8, 10, 13, 20, 25, 40, 50, 52, 100, 125, 200, 250, 400, 475, 500, 601, 848, 908, 1000, 1120, 1250, 1750, 2000, 2500, 2800, 2900, 3670, 4000, 4375, 4685, 5000, 6085, 7000, 7640, 7924, 8375, 10000, 10900, 12500, 13346, 14000, 17800, 20000, 21568, 25000 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
For a >= 0, the infinite subsequence of numbers 10^a, 2^b*10^a (for 1 <= b <= 2) and 5^c*10^a (for 1 <= c <= 3), i.e., 1, 2, 4, 5, 10, 20, 25, 40, 50, 100, 125, 200, 250, 400, 500, 1000, 1250, 2000, 2500, 4000, 5000, ... are terms in the sequence because first, the concatenation 1, 2, 3, ... up to (10^a - 1) mod 10^a is equal to 10^a times the concatenation 1, 2, 3, ... up to (10^a - 2) + (10^a - 1) mod 10^a, which results in 10^a - 1 and second, the concatenation 1, 2, 3, ... up to (2^b*10^a - 1) mod 2^b*10^a is equal to 10^(a+1) times the concatenation 1, 2, 3, ... up to (2^b*10^a - 2) + (2^b*10^a - 1) mod 2^b*10^a, which results in 2^b*10^a - 1 and third, the concatenation 1, 2, 3, ... up to (5^c*10^a - 1) mod 5^c*10^a is equal to 10^(a+c) times the concatenation 1, 2, 3, ... up to (5^c*10^a - 2) + (5^c*10^a - 1) mod 5^c*10^a, which results in 5^c*10^a - 1.
LINKS
EXAMPLE
13 is a term because 123456789101112 mod 13 = 12.
20 is a term because 12345678910111213141516171819 mod 20 = 19.
MAPLE
a:=proc(m)
local A, str, i;
if m = 1 then return([1]);
else
if m = 2 then return([1, 2]);
else
A := [1, 2];
str := 1;
for i from 2 to m do
str := str*10^length(i) + i;
if str mod (i+1) = i then A := [op(A), i+1]; fi;
od;
fi;
fi;
return(A);
end:
PROG
(Python)
from itertools import count, islice
def agen():
s = "0"
for n in count(1):
if int(s)%n == n - 1: yield n
s += str(n)
print(list(islice(agen(), 30))) # Michael S. Branicky, Nov 23 2022
CROSSREFS
Sequence in context: A036404 A347355 A186077 * A018498 A002048 A174989
KEYWORD
nonn,base
AUTHOR
Martin Renner, Nov 23 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 04:46 EDT 2024. Contains 373140 sequences. (Running on oeis4.)