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.

A037504 Base-3 digits are, in order, the first n terms of the periodic sequence with initial period 1,2,0.

This page as a plain text file.
%I A037504 #15 Jun 13 2015 00:49:15
%S A037504 1,5,15,46,140,420,1261,3785,11355,34066,102200,306600,919801,2759405,
%T A037504 8278215,24834646,74503940,223511820,670535461,2011606385,6034819155,
%U A037504 18104457466,54313372400,162940117200,488820351601
%N A037504 Base-3 digits are, in order, the first n terms of the periodic sequence with initial period 1,2,0.
%H A037504 Harvey P. Dale, <a href="/A037504/b037504.txt">Table of n, a(n) for n = 1..1000</a>
%H A037504 <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,1,-3).
%F A037504 G.f.: x*(1+2*x) / ( (x-1)*(3*x-1)*(1+x+x^2) ). - _R. J. Mathar_, Apr 27 2015
%t A037504 Module[{nn=30,d},d=PadRight[{},nn,{1,2,0}];Table[FromDigits[Take[d,n],3],{n,nn}]] (* or *) LinearRecurrence[{3,0,1,-3},{1,5,15,46},30] (* _Harvey P. Dale_, Apr 25 2015 *)
%K A037504 nonn,base,easy
%O A037504 1,2
%A A037504 _Clark Kimberling_