A293957 When A002487 is written as a triangle the n-th row has length 2^(n-1); a(n) is the maximal multiplicity of any entry in that row, considering the entries strictly between the initial 1 and the central 2.
0, 0, 0, 1, 1, 2, 2, 4, 5, 6, 8, 12, 16, 22, 29, 36, 48, 67, 84, 118, 151, 203, 270, 362, 472, 636, 846, 1142, 1526, 2024, 2736, 3666, 4918, 6550, 8776, 11796, 15824
Offset: 0
Examples
Rows 0 through 6 of A002487 are: 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 1, 6, 5, 9, 4, 11, 7, 10, 3, 11, 8, 13, 5, 12, 7, 9, 2, 9, 7, 12, 5, 13, 8, 11, 3, 10, 7, 11, 4, 9, 5, 6, To find a(5) we consider the entries 1, 5, 4, 7, 3, 8, 5, 7, 2 in row 5. Ignoring the initial 1 and the final 2, the maximal multiplicity is 2 (for example, 5 appears twice), so a(5) = 2. From _Don Reble_, Nov 04 2017: (Start) The initial values of a(n) for n >= 3 together with the terms that have the highest multiplicity are: 3 1 [3] 4 1 [3 4 5] 5 2 [5 7] 6 2 [5 7 9 11] 7 4 [11] 8 5 [13 17] 9 6 [19 23 31 41] 10 8 [23 37 43] 11 12 [71] 12 16 [71] 13 22 [127] 14 29 [109] 15 36 [199 251] 16 48 [263] 17 67 [433] 18 84 [701] 19 118 [839] 20 151 [1193] 21 203 [1801] 22 270 [2693] 23 362 [4229] 24 472 [4349] 25 636 [7759] 26 846 [11287] 27 1142 [14627] 28 1526 [20929] 29 2024 [37243] 30 2736 [43133] 31 3666 [67231] 32 4918 [90227] 33 6550 [127819] 34 8776 [181031] 35 11796 [251071] 36 15824 [394549] (End)
Programs
-
Maple
A002487 := proc(n) option remember; if n <= 1 then n elif n mod 2 = 0 then procname(n/2); else procname((n-1)/2)+procname((n+1)/2); fi; end: ans:=[]; for n from 3 to 18 do b1:=2^(n-1); b2:=2^n-1; b3:=2^(n-2)-1; mx:=0; ar:=Array(0..b1-1,0); for k from 1 to b3 do kk:=b1+k; v:=A002487(kk); ar[v]:=ar[v]+1; od: for k from 0 to b1-1 do if ar[k]>mx then mx:=ar[k]; fi; od: ans:=[op(ans),mx]; od: ans;
-
Python
from itertools import chain, product from collections import Counter from functools import reduce def A293957(n): return 0 if n <= 2 else max(Counter(m for m in (sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if y else (x[0]+x[1],x[1]),chain(k,(1,)),(1,0))) for k in product((False,True),repeat=n-2)) if m != 1 and m != 2).values()) # Chai Wah Wu, Jun 20 2022
Extensions
a(19)-a(36) from Don Reble, Nov 04 2017
Comments