login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A350570
a(n) is the smallest multiple of 7 that can be formed by concatenating the first n positive integers in some order.
0
21, 231, 3241, 12453, 123564, 1234576, 12347685, 123456879, 10123456798, 1011123456798, 101111223456789, 10111121323457896, 1011112131423457896, 101111213141523456879, 10111121314151623456789, 1011112131415161723456789, 101111213141516171823458796
OFFSET
2,1
EXAMPLE
(2, 1) 21
(2, 3, 1) 231
(3, 2, 4, 1) 3241
(1, 2, 4, 5, 3) 12453
(1, 2, 3, 5, 6, 4) 123564
(1, 2, 3, 4, 5, 7, 6) 1234576
(1, 2, 3, 4, 7, 6, 8, 5) 12347685
(1, 2, 3, 4, 5, 6, 8, 7, 9) 123456879
From Jon E. Schoenfield, Jan 07 2022: (Start)
Observation: for each term from a(2) through a(18), if the positive integers are originally arranged in a string of digits in order from 1 through 9 (or 1 through n for n < 9), left to right, and then (for n > 9) the remaining numbers are incorporated into the string by placing '10' to the left of the initial '1' and then placing all remaining numbers in order from left to right between the '1' and the '2' (e.g., so as to yield the concatenation 10/1/11/12/13/14/15/16/17/18/2/3/4/5/6/7/8/9 for n=18), then at most 4 digits at the right end of the concatenated string need to be rearranged to obtain a(n), as shown here, where a space is inserted to the left of the digits (if any) that need to be rearranged:
21
231
3241
12 453
123 564
12345 76
1234 7685
123456 879
101234567 98
10111234567 98
101111223456789
1011112132345 7896
101111213142345 7896
101111213141523456 879
10111121314151623456789
1011112131415161723456789
10111121314151617182345 8796
(End)
CROSSREFS
Cf. A008589.
Sequence in context: A321952 A125409 A161581 * A069601 A173347 A360854
KEYWORD
nonn,base
AUTHOR
Claudio Meller, Jan 06 2022
EXTENSIONS
a(12)-a(18) from Jon E. Schoenfield, Jan 06 2022
STATUS
approved