cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A306801 An irregular fractal sequence: underline a(n) iff [a(n-1) + a(n)] is divisible by 3; all underlined terms rebuild the starting sequence.

This page as a plain text file.
%I A306801 #11 Mar 12 2019 22:30:22
%S A306801 1,3,2,1,4,6,3,5,8,9,7,2,1,10,12,11,4,13,15,6,3,14,17,18,16,5,20,21,
%T A306801 19,8,23,24,9,22,25,27,26,7,2,1,28,30,29,10,31,33,12,32,35,36,34,11,4,
%U A306801 37,39,38,13,40,42,15,6,3,41,44,45,43,14,47,48,46,17,50,51,18,49,52,54,53,16,5,56,57,55,20,59,60,21,58,61,63
%N A306801 An irregular fractal sequence: underline a(n) iff [a(n-1) + a(n)] is divisible by 3; all underlined terms rebuild the starting sequence.
%C A306801 The sequence S starts with a(1) = 1 and a(2) = 3. S is extended by duplicating the first term A among the not yet duplicated terms, under the condition that [A + the last term Z of the sequence] is divisible by 3. If this is not the case, we then extend S with the smallest integer X not yet present in S such that [X + the last term Z of the sequence] is not divisible by 3. This is the lexicographically first sequence with this property.
%H A306801 Jean-Marc Falcoz, <a href="/A306801/b306801.txt">Table of n, a(n) for n = 1..10002</a>
%e A306801 S starts with a(1) = 1 and a(2) = 3.
%e A306801 Can we duplicate a(1) to form a(3)? No, as a(2) + a(3) would be 4 and 4 is not divisible by 3; we thus extend S with the smallest integer X not yet in S such that [X + a(2)]  is not divisible by 3. We get X = 2 and thus a(3) = 2.
%e A306801 Can we duplicate a(1) to form a(4)? Yes, as now [a(1) + a(3)] is divisible by 3; we get thus a(4) = 1.
%e A306801 Can we duplicate a(2) to form a(5)? No, as a(4) + a(2) would be 4 and 4 is not divisible by 3; we thus extend S with the smallest integer X not yet in S such that [X + a(4)]  is not divisible by 3. We get X = 4 and thus a(5) = 4.
%e A306801 Can we duplicate a(2) to form a(6)? No, as a(5) + a(2) would be 7 and 7 is not divisible by 3; we thus extend S with the smallest integer X not yet in S such that [X + a(5)]  is not divisible by 3. We get X = 6 and thus a(6) = 6.
%e A306801 Can we duplicate a(2) to form a(7)? Yes, as now [a(2) + a(6)] is divisible by 3; we get thus a(7) = 3.
%e A306801 Can we duplicate a(3) to form a(8)? No, as a(7) + a(3) would be 5 and 5 is not divisible by 3; we thus extend S with the smallest integer X not yet in S such that [X + a(6)]  is not divisible by 3. We get X = 6 and thus a(8) = 5.
%e A306801 Etc.
%Y A306801 Cf. A122196 (which is obtained by replacing 3 by 2 in the definition of this sequence).
%K A306801 nonn,base
%O A306801 1,2
%A A306801 _Alexandre Wajnberg_ and _Eric Angelini_, Mar 11 2019