[go: up one dir, main page]

login
Revision History for A373420 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of Carlitz compositions of n (see A003242) such that the first and last parts are equal.
(history; published version)
#27 by N. J. A. Sloane at Fri Aug 16 20:52:34 EDT 2024
STATUS

editing

approved

#26 by N. J. A. Sloane at Fri Aug 16 20:52:25 EDT 2024
NAME

Number of Carlitz compositions of n (see A003242) such that the first and last parts are equal.

STATUS

proposed

editing

Discussion
Fri Aug 16
20:52
N. J. A. Sloane: edited
#25 by John Tyler Rascoe at Fri Aug 16 16:06:19 EDT 2024
STATUS

editing

proposed

#24 by John Tyler Rascoe at Fri Aug 16 16:06:16 EDT 2024
PROG

C_x(N) = { my(g =1/(1-sum(k=1, N, x^k/(1+x^k)))); g}

#23 by John Tyler Rascoe at Fri Aug 16 16:04:18 EDT 2024
#22 by John Tyler Rascoe at Fri Aug 16 15:58:56 EDT 2024
NAME

Number of Carlitz compositions of n such that the first part and last part parts are equal.

PROG

A_x(i, N) = {my( x='x+O('x^N), f=(x^i)*(C_x(N)*(x^i)+x^i+1)/(1+x^i)^2); f}

D_x(2040)

CROSSREFS
#21 by John Tyler Rascoe at Fri Aug 16 15:30:21 EDT 2024
NAME

allocated for John Tyler RascoeNumber of Carlitz compositions of n such that the first part and last part are equal.

DATA

1, 1, 1, 1, 2, 3, 2, 7, 11, 17, 26, 54, 86, 155, 272, 464, 816, 1447, 2507, 4400, 7706, 13456, 23570, 41293, 72212, 126394, 221282, 387219, 677714, 1186311, 2076170, 3633761, 6360219, 11131698, 19483066, 34100455, 59683664, 104460655, 182832044, 319999739

OFFSET

0,5

FORMULA

G.f.: 1 + Sum_{i>0} (x^i)*(C(x)*(x^i) + x^i + 1)/(1+x^i)^2 where C(x) is the g.f. for A003242.

EXAMPLE

a(7) = 7 counts: (1,2,1,2,1), (1,2,3,1), (1,3,2,1), (1,5,1), (2,3,2), (3,1,3), and (7).

PROG

(PARI)

C_x(N) = { my(g =1/(1-sum(k=1, N, x^k/(1+x^k)))); g}

A_x(i, N) = {my( f=(x^i)*(C_x(N)*(x^i)+x^i+1)/(1+x^i)^2); f}

D_x(N) = {my( x='x+O('x^N), f=1+sum(i=1, N, A_x(i, N))); Vec(f)}

D_x(20)

CROSSREFS
KEYWORD

allocated

nonn,easy

AUTHOR

John Tyler Rascoe, Aug 16 2024

STATUS

approved

editing

#20 by John Tyler Rascoe at Fri Aug 16 15:30:21 EDT 2024
NAME

allocated for John Tyler Rascoe

KEYWORD

recycled

allocated

#19 by N. J. A. Sloane at Fri Aug 16 09:23:02 EDT 2024
STATUS

editing

approved

#18 by N. J. A. Sloane at Fri Aug 16 09:22:57 EDT 2024
NAME

a(2*n) = A135318(n), a(2*n+1) = A112387(n).

DATA

1, 1, 1, 1, 1, 2, 2, 1, 3, 4, 4, 3, 5, 8, 8, 5, 11, 16, 16, 11, 21, 32, 32, 21, 43, 64, 64, 43, 85, 128, 128, 85, 171, 256, 256, 171, 341, 512, 512, 341, 683, 1024, 1024, 683, 1365, 2048, 2048, 1365, 2731, 4096, 4096, 2731, 5461, 8192, 8192, 5461, 10923, 16384

OFFSET

0,6

LINKS

<a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1,0,0,0,2).

FORMULA

a(4*n+1) + a(4*n+1) + a(4*n+2) + a(4*n+3) = 4, 6, 14, 26, ... = A084214(n+2) = 2*A048573(n).

a(2*n) + a(2*n+1) = 2, 2, 3, 3, 7, 7, ... = repeat A048573(n).

a(3*n) + a(3*n+1) + a(3*n+2) = 3, 4, 6, 11, 21, 32, 48, 85, 171, 256, 384 ... = b(n). 3, 11, 21, 85, 171, ... are from A001045. b(2*n) is divisible by 3.

CROSSREFS
KEYWORD

nonn,easy,changed

recycled

AUTHOR

Paul Curtz, Aug 03 2024

STATUS

proposed

editing