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.

A316749 A self-"read and extend" sequence built following the rules given in the Comments section.

This page as a plain text file.
%I A316749 #12 Aug 26 2018 01:08:35
%S A316749 1,2,4,8,16,15,30,29,58,57,56,112,224,223,446,445,890,889,1778,1777,3,
%T A316749 6,5,7,14,13,9,18,36,10,20,19,11,22,44,88,87,174,12,24,23,46,17,34,33,
%U A316749 66,21,25,24,48,47,94,93,186,185,370,740,739,1478,1477,2954,2953,2952,5904,5903,11806,23612,23611,26,52
%N A316749 A self-"read and extend" sequence built following the rules given in the Comments section.
%C A316749 Start with a(1) = 1 and a(2) = 2; read the sequence digit by digit starting from the left:
%C A316749 when the read digit is smaller than the next one, multiply by 2 the last integer of the sequence and extend it with the result;
%C A316749 when the read digit is bigger than the next one, subtract 1 from the last integer of the sequence and extend it with the result;
%C A316749 when both digits are equal, extend the sequence with the smallest integer not present so far.
%H A316749 Jean-Marc Falcoz, <a href="/A316749/b316749.txt">Table of n, a(n) for n = 1..10002</a>
%e A316749 As the only digit of a(1) = 1 is smaller than 2 (the next digit), we extend the sequence with 4 (that is, 2 times 2);
%e A316749 as the only digit of a(2) = 2 is smaller than 4 (the next digit), we extend the sequence with 8 (that is, 2 times 4);
%e A316749 as the only digit of a(3) = 4 is smaller than 8 (the next digit), we extend the sequence with 16 (that is, 2 times 8);
%e A316749 as the only digit of a(4) = 8 is bigger than 1 (the next digit), we extend the sequence with 15 (that is, 16 minus 1);
%e A316749 as the first digit of a(5) = 1 is smaller than 6 (the next digit), we extend the sequence with 30 (that is, 2 times 15);
%e A316749 as the last digit of a(5) = 6 is bigger than 1 (the next digit), we extend the sequence with 29 (that is, 30 minus 1);
%e A316749 ...
%e A316749 as the first digit of a(12) = 1 is equal to 1 (the next digit), we extend the sequence with 3 (this is the smallest integer not yet present in the sequence and is written after a(23) = 1777);
%e A316749 etc.
%K A316749 base,nonn,look
%O A316749 1,2
%A A316749 _Eric Angelini_ and _Jean-Marc Falcoz_, Jul 12 2018