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.

A057165 Indices of addition steps in Recamán's sequence A005132.

This page as a plain text file.
%I A057165 #24 May 01 2020 18:49:22
%S A057165 0,1,2,3,5,6,7,9,11,13,15,17,18,19,21,24,26,28,30,32,33,34,36,39,41,
%T A057165 43,45,47,49,51,53,55,57,59,61,63,65,66,67,69,71,73,75,78,80,82,84,86,
%U A057165 88,90,92,94,96,98,100,101,102,104,106,108,112,113,114
%N A057165 Indices of addition steps in Recamán's sequence A005132.
%H A057165 Reinhard Zumkeller, <a href="/A057165/b057165.txt">Table of n, a(n) for n = 1..10001</a>
%H A057165 Nick Hobson, <a href="/A057165/a057165.py.txt">Python program for this sequence</a>
%H A057165 C. L. Mallows, <a href="/A005132/a005132.jpg">Plot (jpeg) of first 10000 terms of A005132</a>
%H A057165 C. L. Mallows, <a href="/A005132/a005132.ps">Plot (postscript) of first 10000 terms of A005132</a>
%H A057165 <a href="/index/Rea#Recaman">Index entries for sequences related to Recamán's sequence</a>
%o A057165 (Haskell)
%o A057165 import Data.Set (Set, singleton, notMember, insert)
%o A057165 a057165 n = a057165_list !! n
%o A057165 a057165_list = r (singleton 0) 1 0 where
%o A057165    r :: Set Integer -> Integer -> Integer -> [Integer]
%o A057165    r s n x = if x > n && (x - n) `notMember` s
%o A057165                 then r (insert (x-n) s) (n+1) (x-n)
%o A057165                 else n : r (insert (x+n) s) (n+1) (x+n)
%o A057165 -- _Reinhard Zumkeller_, Mar 17 2011
%Y A057165 Cf. A005132, A057166, A057167.
%Y A057165 Union of A187921 and A187922.
%K A057165 nonn
%O A057165 1,3
%A A057165 _N. J. A. Sloane_, Sep 14 2000
%E A057165 Initial zero added by _N. J. A. Sloane_, May 01 2020