login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A306806 An irregular fractal sequence: underline a(n) iff [a(n-1) + a(n)] is divisible by the rightmost digit of a(n); all underlined terms rebuild the starting sequence. 1
1, 2, 1, 3, 4, 2, 1, 5, 6, 3, 7, 8, 4, 2, 1, 9, 12, 13, 14, 15, 5, 16, 17, 18, 6, 3, 19, 22, 24, 23, 25, 26, 27, 28, 7, 32, 8, 4, 2, 1, 29, 33, 34, 35, 36, 9, 37, 38, 12, 39, 42, 43, 44, 13, 45, 46, 14, 47, 48, 49, 52, 54, 53, 55, 15, 5, 56, 16, 57 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The sequence S starts with a(1) = 1 and a(2) = 2. No term is allowed to end with a 0 digit. S is extended by duplicating the first term A among the not yet duplicated terms, under the condition that the sum [a(n-1) + a(n)] is divisible by the rightmost digit of a(n). If this is not the case, we then extend S with the smallest integer X not yet present in S such that the sum [a(n-1) + a(n)] is not divisible by the rightmost digit of a(n). S is the lexicographically earliest sequence with this property.

LINKS

Jean-Marc Falcoz, Table of n, a(n) for n = 1..10002

EXAMPLE

S starts with a(1) = 1 and a(2) = 2

Can we duplicate a(1) to form a(3)? Yes, as the sum [a(2) + a(3) = 3] is divisible by 1, the rightmost digit of a(3); thus a(3) = 1.

Can we duplicate a(2) to form a(4)? No, as the sum [a(3) + a(4) = 3] is not divisible by 2, the rightmost digit of a(4); we thus extend S with the smallest integer X not yet in S such that the sum [a(3) + X] is not divisible by the rightmost digit of a(4); thus a(4) = 3.

Can we duplicate a(2) to form a(5)? No, as the sum [a(4) + a(5) = 7] is not divisible by 2, the rightmost digit of a(5); we thus extend S with the smallest integer X not yet in S such that the sum [a(4) + X] is not divisible by the rightmost digit of a(5); thus a(5) = 4.

Can we duplicate a(2) to form a(6)? Yes, as the sum [a(5) + a(6) = 6 is divisible by 2, the rightmost digit of a(6); thus a(6) = 2.

Can we duplicate a(3) to form a(7)? Yes, as 1 can always be duplicated; thus a(7) = 1.

Can we duplicate a(4) to form a(8)? No, as the sum [a(7) + a(8) = 5] is not divisible by 2, the rightmost digit of a(8); we thus extend S with the smallest integer X not yet in S such that the sum [a(7) + X] is not divisible by the rightmost digit of a(8); thus a(8) = 5.

Can we duplicate a(4) to form a(9)? No, as the sum [a(8) + a(9) = 8] is not divisible by 3, the rightmost digit of a(9); we thus extend S with the smallest integer X not yet in S such that the sum [a(8) + X] is not divisible by the rightmost digit of a(9); thus a(9) = 6.

Can we duplicate a(4) to form a(10)? Yes, as the sum [a(9) + a(10) = 9] is divisible by 3, the rightmost digit of a(10); thus a(10) = 3.

Etc.

CROSSREFS

Cf. A306805 [obtained by replacing the word _rightmost_ by _leftmost_ in the definition. This sequence diverges from A306805 with a(17) = 12, as opposite to a(17) = 20].

Sequence in context: A112384 A248514 A123390 * A306805 A162598 A088208

Adjacent sequences:  A306803 A306804 A306805 * A306807 A306808 A306809

KEYWORD

base,nonn

AUTHOR

Eric Angelini and Jean-Marc Falcoz, Mar 11 2019

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 22 19:11 EDT 2021. Contains 343177 sequences. (Running on oeis4.)