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.

A209386 a(n) = 2*A005132(n).

This page as a plain text file.
%I A209386 #13 Jan 04 2018 01:33:56
%S A209386 0,2,6,12,4,14,26,40,24,42,22,44,20,46,18,48,16,50,86,124,84,126,82,
%T A209386 36,84,34,86,32,88,30,90,28,92,158,226,156,228,154,78,156,76,158,74,
%U A209386 160,72,162,70,164,68,166,66,168,64,170,62,172,60,174,58,176,56,178,54,180,52,182,314,448,312,450,310
%N A209386 a(n) = 2*A005132(n).
%C A209386 This is the even-numbers version of Recamán's sequence A005132: a(0)=0; for n>0, a(n) = a(n-1)-2n if that number is >= 0 and not already in the sequence, otherwise a(n) = a(n-1)+2n.
%H A209386 G. C. Greubel, <a href="/A209386/b209386.txt">Table of n, a(n) for n = 0..1000</a>
%t A209386 f[s_List]:= Block[{a = s[[-1]], len = Length@s}, Append[s, If[a > len && ! MemberQ[s, a - len], a - len, a + len]]]; A005132:= Nest[f, {0}, 130]; Table[2*A005132[[n]], {n, 1, 50}] (* _G. C. Greubel_, Jan 03 2018 *)
%Y A209386 Cf. A005132, A209387.
%K A209386 nonn
%O A209386 0,2
%A A209386 _N. J. A. Sloane_, Mar 07 2012