login
a(n) = 3*4^n - 2*3^n.
7

%I #29 Nov 15 2023 19:04:41

%S 1,6,30,138,606,2586,10830,44778,183486,747066,3027630,12228618,

%T 49268766,198137946,795740430,3192527658,12798808446,51281327226,

%U 205383589230,822309197898,3291561314526,13173218826906,52713796014030,210917946175338,843860071059006,3376005143308986,13505715150454830

%N a(n) = 3*4^n - 2*3^n.

%C a(n-1) is also the number of n-digit numbers whose largest decimal digit is 3. - _Stefano Spezia_, Nov 15 2023

%H Shalosh B. Ekhad, N. J. A. Sloane, and Doron Zeilberger, <a href="http://arxiv.org/abs/1503.01796">A Meta-Algorithm for Creating Fast Algorithms for Counting ON Cells in Odd-Rule Cellular Automata</a>, arXiv:1503.01796 [math.CO], 2015; see also the <a href="http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/CAcount.html">Accompanying Maple Package</a>.

%H Shalosh B. Ekhad, N. J. A. Sloane, and Doron Zeilberger, <a href="http://arxiv.org/abs/1503.04249">Odd-Rule Cellular Automata on the Square Grid</a>, arXiv:1503.04249 [math.CO], 2015.

%H N. J. A. Sloane, On the No. of ON Cells in Cellular Automata, Video of talk in Doron Zeilberger's Experimental Math Seminar at Rutgers University, Feb. 05 2015: <a href="https://vimeo.com/119073818">Part 1</a>, <a href="https://vimeo.com/119073819">Part 2</a>

%H N. J. A. Sloane, <a href="http://arxiv.org/abs/1503.01168">On the Number of ON Cells in Cellular Automata</a>, arXiv:1503.01168 [math.CO], 2015

%H <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (7,-12).

%F G.f.: (1-x)/((1-3*x)*(1-4*x)).

%F a(n+1) = 7*a(n) - 12*a(n-1) with a(0)=1, a(1)=6.

%F a(n) = A255462(2^n-1).

%F E.g.f.: exp(3*x)*(3*exp(x) - 2). - _Stefano Spezia_, Nov 15 2023

%t Table[3 4^n - 2 3^n, {n, 0, 30}] (* _Vincenzo Librandi_, May 04 2015 *)

%o (PARI) a(n)=3*4^n-2*3^n \\ _M. F. Hasler_, May 04 2015

%o (Magma) [3*4^n-2*3^n: n in [0..30]]; // _Vincenzo Librandi_, May 04 2015

%Y Cf. A255462.

%Y First differences of 4^n - 3^n = A005061(n). See A257285, A257286, A257287, A257288, A257289 for first differences of 5^n - 4^n, ..., 9^n - 8^n. - _M. F. Hasler_, May 04 2015

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_ and _Doron Zeilberger_, Feb 23 2015

%E Simpler definition from _N. J. A. Sloane_, Mar 10 2015