The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A321579 Number of n-tuples of 4 elements excluding reverse duplicates and those consisting of repetitions of the same element only. 1
0, 0, 6, 36, 132, 540, 2076, 8316, 32892, 131580, 524796, 2099196, 8390652, 33562620, 134225916, 536903676, 2147516412, 8590065660, 34359869436, 137439477756, 549756338172, 2199025352700, 8796095119356, 35184380477436, 140737496743932 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Also the number of distinct DNA or RNA sequences of length n if the reverse copies and homopolymeric oligonucleotides (i.e., repetitions of the same nucleobases: aaa..., ccc..., ggg..., and ttt... (or uuu...)) are excluded.
LINKS
FORMULA
a(n) = (2^(n-2)*((-1)^(n+1) + 3) + 2^(2*n-1) - 4) for n > 0.
a(n) = A032121(n) - 4 for n > 2.
G.f.: 6*x^2*(8*x^2 - x - 1)/((x-1)*(2*x+1)*(2*x-1)*(4*x-1)).
a(n) = 5*a(n-1) - 20*a(n-3) + 16*a(n-4). - Colin Barker, Nov 14 2018
EXAMPLE
a(2) = 6 because {a,c,g,t} give six 2-tuples (duples): {a,c}, {a,g}, {a,t}, {c,g}, {c,t}, {g,t} as 4: {a,a}, {c,c}, {g,g}, {t,t} (consisting of the same element only) and 6 reverse duplicates: {c,a}, {g,a}, {t,a}, {g,c}, {t,c}, {t,g} are excluded ({c,a} is the duplicate of {a,c}, etc.), leaving 6 from 16 possible 2-tuples.
MATHEMATICA
a[n_]:=(2^(# - 2)*((-1)^(# + 1) + 3) + 2^(2*# - 1) - 4)&/@ Range@n; a[25] (* or *)
CoefficientList[Series[6*(8*x^3-x^2-x)/(16*x^4-20*x^3+5*x-1), {x, 0, 20}], x]
LinearRecurrence[{5, 0, -20, 16}, {0, 0, 6, 36, 132}, 30] (* Harvey P. Dale, Mar 20 2023 *)
PROG
(PARI) concat([0, 0], Vec(6*x^2*(1 + x - 8*x^2) / ((1 - x)*(1 - 2*x)*(1 + 2*x)*(1 - 4*x)) + O(x^40))) \\ Colin Barker, Nov 14 2018
CROSSREFS
Cf. A032121.
Sequence in context: A331576 A056375 A360588 * A364429 A018214 A181478
KEYWORD
nonn,easy
AUTHOR
Mikk Heidemaa, Nov 13 2018
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 16:38 EDT 2024. Contains 372548 sequences. (Running on oeis4.)