login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A276029 Number of ways to transform a sequence of n ones and n twos to a single number by continually removing two numbers and replacing them with their sum modulo 3. 2

%I

%S 1,4,27,228,2226,23778,270693,3229106,39922172,507680620,6604676830,

%T 87549425068,1178880306174,16086844260290,222045139578443,

%U 3095457073064120,43529719213465854,616853383573066504,8801227720060618544,126344910516550743232

%N Number of ways to transform a sequence of n ones and n twos to a single number by continually removing two numbers and replacing them with their sum modulo 3.

%C Originally this entry had a reference to a paper on the arXiv by Caleb Ji, Enumerative Properties of Posets Corresponding to a Certain Class of No Strategy Games, arXiv:1608.06025 [math.CO], 2016. However, this article has since been removed from the arXiv. - _N. J. A. Sloane_, Sep 07 2018

%H Alois P. Heinz, <a href="/A276029/b276029.txt">Table of n, a(n) for n = 1..800</a>

%F a(n) = b(0, n, n) where f(a, b, c) is the number of ways to reach one number beginning with a zeros, b ones, and c twos.

%F Then f(a, b, c) = f_1 + f_2 + f_3 + f_4 where f_1 = f(a-1, b, c) if a>=2 or a, b >=1 or a,c >=1, f_2 = f(a, b-2, c+1) if b >= 2, f_3 = f(a, b+1, c-2) if c >= 2, and f_4 = f(a+1, b-1, c-1) if b, c >= 1, and each are 0 otherwise. Initial terms: f(a, b, c) = 1 for all 1 <= a+b+c <= 2, where a, b, c >= 0.

%p b:= proc(x, y, z) option remember;

%p `if`(x+y+z=1, 1, `if`(y>0 and z>0, b(x+1, y-1, z-1), 0)+

%p `if`(x>1 or x>0 and y>0 or x>0 and z>0, b(x-1, y, z), 0)+

%p `if`(y>1, b(x, y-2, z+1), 0)+`if`(z>1, b(x, y+1, z-2), 0))

%p end:

%p a:= n-> b(0, n, n):

%p seq(a(n), n=1..35); # _Alois P. Heinz_, Aug 18 2016

%t b[x_, y_, z_] := b[x, y, z] = If[x + y + z == 1, 1, If[y > 0 && z > 0, b[x + 1, y - 1, z - 1], 0] + If[x > 1 || x > 0 && y > 0 || x > 0 && z > 0, b[x - 1, y, z], 0] + If[y > 1, b[x, y - 2, z + 1], 0] + If[z > 1, b[x, y + 1, z - 2], 0]];

%t a[n_] := b[0, n, n];

%t Table[a[n], {n, 1, 35}] (* _Jean-Fran├žois Alcover_, Nov 10 2017, after _Alois P. Heinz_ *)

%Y Cf. A276027, A276028.

%K nonn

%O 1,2

%A _Caleb Ji_, Aug 17 2016

%E More terms from _Alois P. Heinz_, Aug 18 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 19 12:40 EST 2022. Contains 350465 sequences. (Running on oeis4.)