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.

A050096 a(n) = floor(a(n-1)/3) if this is positive and not yet in the sequence, otherwise a(n) = 8*a(n-1).

This page as a plain text file.
%I A050096 #12 Oct 05 2019 18:22:16
%S A050096 1,8,2,16,5,40,13,4,32,10,3,24,192,64,21,7,56,18,6,48,384,128,42,14,
%T A050096 112,37,12,96,768,256,85,28,9,72,576,4608,1536,512,170,1360,453,151,
%U A050096 50,400,133,44,352,117,39,312,104,34,11,88,29,232
%N A050096 a(n) = floor(a(n-1)/3) if this is positive and not yet in the sequence, otherwise a(n) = 8*a(n-1).
%H A050096 Ivan Neretin, <a href="/A050096/b050096.txt">Table of n, a(n) for n = 1..10000</a>
%t A050096 Rest@Nest[Append[#, If[FreeQ[#, r = Quotient[#[[-1]], 3]], r, 8 #[[-1]]]] &, {0, 1}, 55] (* _Ivan Neretin_, Jul 31 2016 *)
%o A050096 (PARI) first(n)=my(v=vector(n),t); v[1]=1; for(i=2,n, t=v[i-1]\3; if(t<2, v[i]=8*v[i-1]; next); for(j=1,i-1, if(v[j]==t, v[i]=8*v[i-1]; next(2))); v[i]=t); v \\ _Charles R Greathouse IV_, Jul 31 2016
%Y A050096 Cf. A050000 and references therein.
%K A050096 nonn
%O A050096 1,2
%A A050096 _Clark Kimberling_