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.

A129000 Start with an integer (in this case, 1). First, add 5 or 8 if the integer is odd or even, respectively. Then divide by 2.

This page as a plain text file.
%I A129000 #21 Jan 01 2024 11:54:06
%S A129000 1,3,4,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,
%T A129000 7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,
%U A129000 7,6,7,6,7,6,7,6,7,6,7,6,7
%N A129000 Start with an integer (in this case, 1). First, add 5 or 8 if the integer is odd or even, respectively. Then divide by 2.
%H A129000 Antti Karttunen, <a href="/A129000/b129000.txt">Table of n, a(n) for n = 1..1001</a>
%H A129000 Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html#arithmprog">Arithmetic Progressions</a>
%H A129000 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0, 1).
%F A129000 a(n) = (a(n-1) + b)/d, if a(n) even = (a(n-1) + c)/d, if a(n) odd (starting with a(1)=1, b=5, c=8, d=2).
%e A129000 a(7) = 6 because (7 + 5)/2 = 6.
%t A129000 a={1};k=1;For[n=1,n<70,n++,If[EvenQ[k],k=k+8,k=k+5];k=k/2;AppendTo[a, k]]; a (* _Stefan Steinerberger_, May 26 2007 *)
%o A129000 (Scheme, with memoization-macro definec) (definec (A129000 n) (if (= 1 n) n (let ((prev (A129000 (- n 1)))) (/ (+ prev (if (odd? prev) 5 8)) 2)))) ;; _Antti Karttunen_, Sep 14 2017
%Y A129000 Cf. A081742, A089610, A014499, A071673.
%K A129000 easy,nonn
%O A129000 1,2
%A A129000 Adam F. Schwartz (adam_s(AT)mit.edu), May 01 2007
%E A129000 More terms from _Stefan Steinerberger_, May 26 2007