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!)
Search: seq:0,1,4,11,28,66,152,339,748,1622
Displaying 1-1 of 1 result found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
A370943 Row sums of A370942: a(n) is the total number of nonempty, longest nonoverlapping properly nested substrings among all strings of parentheses of length n. +30
1
0, 0, 1, 4, 11, 28, 66, 152, 339, 748, 1622, 3496, 7454, 15832, 33380, 70192, 146819, 306508, 637326, 1323272, 2738922, 5662600, 11677916, 24061264 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
a(n) counts the nonempty s_i substrings (as described in A370883) among all strings of parentheses of length n.
See A370942 and A370883 for more information.
LINKS
FORMULA
a(0) = 0; for n >= 1, a(n) = a(n-1) + Sum_{k=2^(n-1)+1..2^n-1} A370942(n,k).
EXAMPLE
a(3) = 4 because the eight strings of parentheses of length 3 contain, in total, 4 properly nested substrings:
.
properly
string nested
substrings
------------------
))) none
))( none
)() ()
)(( none
()) ()
()( ()
(() ()
((( none
MATHEMATICA
countS[s_] := StringCount[s, RegularExpression["(1(?R)*+0)++"]];
Accumulate[Array[Total[countS[IntegerString[Range[2^(#-1), 2^#-2], 2, #]]] &, 20, 0]]
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Paolo Xausa, Mar 06 2024
STATUS
approved
page 1

Search completed in 0.034 seconds

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 August 7 14:45 EDT 2024. Contains 375012 sequences. (Running on oeis4.)