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.

A192263 a(n) = abs(a(n-1) - 3*a(n-2)) with a(1)=a(2)=1.

This page as a plain text file.
%I A192263 #18 Dec 16 2021 12:40:00
%S A192263 1,1,2,1,5,2,13,7,32,11,85,52,203,47,562,421,1265,2,3793,3787,7592,
%T A192263 3769,19007,7700,49321,26221,121742,43079,322147,192910,773531,194801,
%U A192263 2125792,1541389,4835987,211820,14296141,13660681,29227742,11754301
%N A192263 a(n) = abs(a(n-1) - 3*a(n-2)) with a(1)=a(2)=1.
%H A192263 Harvey P. Dale, <a href="/A192263/b192263.txt">Table of n, a(n) for n = 1..1000</a>
%e A192263 a(3)=abs(1-3*1)=2, a(4)=abs(2-3*1)=1, a(5)=abs(1-3*2)=5, a(6)=abs(5-3*1)=2, a(7)=abs(2-3*5)=13.
%p A192263 A192263 := proc(n) option remember; if n <=2 then 1; else abs(procname(n-1)-3*procname(n-2)) ; end if; end proc: # _R. J. Mathar_, Jul 12 2011
%t A192263 nxt[{a_,b_}]:={b,Abs[b-3a]}; NestList[nxt,{1,1},40][[All,1]] (* _Harvey P. Dale_, Dec 16 2021 *)
%o A192263 (MATLAB) % n = number of computed terms of sequence. Beware of 64bit restrictions of MATLAB integers and floating point numbers
%o A192263 a(1)=1 ; a(2)=1 ;
%o A192263 for i=3:n,
%o A192263    a(i) = abs(a(i-1)-3*a(i-2)) ;
%o A192263 end
%o A192263 (PARI) N=66; v=vector(N); /* that many terms */
%o A192263 v[1]=1; v[2]=1; for(n=3,N,v[n]=abs(abs(v[n-1] - 3*v[n-2])));
%o A192263 v /* show terms */  /* _Joerg Arndt_, Jul 02 2011 */
%K A192263 nonn,easy
%O A192263 1,3
%A A192263 _Pasi Airikka_, Jun 27 2011