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.

A386227 Expansion of e.g.f. cosh(x)^2*(1 + x + x^2/2).

This page as a plain text file.
%I A386227 #10 Jul 20 2025 15:39:49
%S A386227 1,1,3,6,20,40,152,224,1024,1152,6272,5632,35840,26624,194560,122880,
%T A386227 1015808,557056,5144576,2490368,25427968,11010048,123207680,48234496,
%U A386227 587202560,209715200,2759852032,905969664,12817793024,3892314112,58921582592,16642998272,268435456000,70866960384
%N A386227 Expansion of e.g.f. cosh(x)^2*(1 + x + x^2/2).
%C A386227 a(n) is the number of ternary strings of length n that contain at most two 1's, an even number of 0's, and an even number of 2's.
%H A386227 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,12,0,-48,0,64).
%F A386227 a(n) = n*2^(n-2) for odd n >= 3.
%F A386227 a(n) = 2^(n-3)*(binomial(n,2) + 4) for even n >= 4.
%F A386227 a(2n+1) = A229580(n+1).
%F A386227 G.f.: (1 + x - 9*x^2 - 6*x^3 + 32*x^4 + 16*x^5 - 8*x^6 - 32*x^7 - 32*x^8)/((1 - 2*x)^3*(1 + 2*x)^3).
%e A386227 a(5) = 40 since the strings are the 30 permutations of 10022, the 5 permutations of 10000, and the 5 permutations of 12222.
%e A386227 a(6) = 152 since the strings are (number of permutations in parentheses): 110022 (90), 110000 (15), 112222 (15), 000022(15), 002222 (15), 222222 (1), 000000 (1).
%Y A386227 Cf. A229580, A385083, A385601.
%K A386227 nonn,easy
%O A386227 0,3
%A A386227 _Enrique Navarrete_, Jul 15 2025