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.

A277558 A variation on Recamán's sequence (A005132): to get a(n), we first try to subtract n from a(n-1): a(n) = a(n-1)-n if positive and not already in the sequence; if not then a(n) = a(n-1)+n-i, where i >= 0 is the smallest number such that a(n-1)+n-i has not already appeared.

This page as a plain text file.
%I A277558 #13 Oct 20 2016 16:10:05
%S A277558 0,1,3,6,2,7,13,20,12,21,11,22,10,23,9,24,8,25,43,62,42,63,41,18,40,
%T A277558 15,39,66,38,67,37,68,36,69,35,70,34,71,33,72,32,73,31,74,30,75,29,76,
%U A277558 28,77,27,78,26,79,133,188,132,189,131,190,130,191,129,192
%N A277558 A variation on Recamán's sequence (A005132): to get a(n), we first try to subtract n from a(n-1): a(n) = a(n-1)-n if positive and not already in the sequence; if not then a(n) = a(n-1)+n-i, where i >= 0 is the smallest number such that a(n-1)+n-i has not already appeared.
%C A277558 Is it ever impossible to extend the sequence -- meaning there is no number less than a(n-1)+n which has not appeared?
%C A277558 After 10^11 terms, the smallest number which has not appeared is 609790506.
%H A277558 Benjamin Chaffin, <a href="/A277558/b277558.txt">Table of n, a(n) for n = 0..10000</a>
%e A277558 a(23) = 18. To get a(24) we try 18-24, but that is negative; so we try 18+24 = 42, but 42 has already appeared; so we try 18+24-1, but 41 has also already appeared; so we try 18+24-2. 40 is positive and has not yet appeared, and so a(24) = 40.
%Y A277558 Cf. A005132, A064387 (chooses a(n-1)+n+i instead of a(n-1)+n-i).
%K A277558 nonn
%O A277558 0,3
%A A277558 _Benjamin Chaffin_, Oct 19 2016