1, 4, 5, 6, 9, 12, 15, 16, 17, 20, 21, 22, 25, 26, 27, 30, 33, 36, 37, 38, 41, 44, 47, 48, 49, 52, 55, 58, 59, 60, 63, 64, 65, 68, 69, 70, 73, 76, 79, 80, 81, 84, 85, 86, 89, 90, 91, 94, 97, 100, 101, 102, 105, 106, 107, 110, 111, 112, 115, 118, 121, 122, 123, 126, 129, 132
Offset: 1
A102378
a(n) = a(n-1) + a([n/2]) + 1, a(1) = 1.
Original entry on oeis.org
1, 3, 5, 9, 13, 19, 25, 35, 45, 59, 73, 93, 113, 139, 165, 201, 237, 283, 329, 389, 449, 523, 597, 691, 785, 899, 1013, 1153, 1293, 1459, 1625, 1827, 2029, 2267, 2505, 2789, 3073, 3403, 3733, 4123, 4513, 4963, 5413, 5937, 6461, 7059, 7657, 8349
Offset: 1
-
Table[Length[Select[IntegerPartitions[n],And[Max@@#>1,And@@IntegerQ/@Log[2,#]]&]],{n,0,30,2}] (* Gus Wiseman, Mar 23 2019 *)
-
from itertools import islice
from collections import deque
def A102378_gen(): # generator of terms
aqueue, f, b, a = deque([2]), True, 1, 2
yield from (1, 3)
while True:
a += b
yield 2*a - 1
aqueue.append(a)
if f: b = aqueue.popleft()
f = not f
A102378_list = list(islice(A102378_gen(),40)) # Chai Wah Wu, Jun 08 2022
Original entry on oeis.org
3, 5, 9, 12, 15, 17, 20, 23, 27, 29, 33, 36, 39, 43, 45, 48, 51, 53, 57, 60, 63, 65, 68, 71, 75, 77, 80, 83, 85, 89, 92, 95, 99, 101, 105, 108, 111, 113, 116, 119, 123, 125, 129, 132, 135, 139, 141, 144, 147, 149, 153, 156, 159, 163, 165, 169, 172, 175, 177, 180, 183
Offset: 1
Original entry on oeis.org
0, 2, 5, 8, 14, 20, 29, 38, 53, 68, 89, 110, 140, 170, 209, 248, 302, 356, 425, 494, 584, 674, 785, 896, 1037, 1178, 1349, 1520, 1730, 1940, 2189, 2438, 2741, 3044, 3401, 3758, 4184, 4610, 5105, 5600, 6185, 6770, 7445, 8120, 8906, 9692, 10589
Offset: 1
-
a123[n_] := a123[n] = If[n == 0, 1, a123[Floor[n/2]] + a123[n-1]];
a[n_] := If[n == 1, 0, (3/2) a123[n-1] - 1]; Array[a, 50] (* Jean-François Alcover, Dec 04 2018 *)
-
from itertools import islice
from collections import deque
def A022907_gen(): # generator of terms
aqueue, f, b, a = deque([2]), True, 1, 2
yield from (0, 2, 5)
while True:
a += b
yield 3*a-1
aqueue.append(a)
if f: b = aqueue.popleft()
f = not f
A022907_list = list(islice(A022907_gen(),40)) # Chai Wah Wu, Jun 08 2022
A131205
a(n) = a(n-1) + a(floor(n/2)) + a(ceiling(n/2)).
Original entry on oeis.org
1, 3, 7, 13, 23, 37, 57, 83, 119, 165, 225, 299, 393, 507, 647, 813, 1015, 1253, 1537, 1867, 2257, 2707, 3231, 3829, 4521, 5307, 6207, 7221, 8375, 9669, 11129, 12755, 14583, 16613, 18881, 21387, 24177, 27251, 30655, 34389, 38513, 43027, 47991
Offset: 1
- T. D. Noe, Table of n, a(n) for n = 1..1000
- Cristina Ballantine, George Beck, and Mircea Merca, Partitions and elementary symmetric polynomials -- an experimental approach, arXiv:2408.13346 [math.CO], 2024. See p. 13.
- Cristina Ballantine, George Beck, Mircea Merca, and Bruce Sagan, Elementary symmetric partitions, arXiv:2409.11268 [math.CO], 2024. See pp. 5, 7.
-
a131205 n = a131205_list !! (n-1)
a131205_list = scanl1 (+) a000123_list -- Reinhard Zumkeller, Oct 10 2013
-
A[1]:= 1:
for n from 2 to 100 do A[n]:= A[n-1] + A[floor(n/2)] + A[ceil(n/2)] od:
seq(A[n],n=1..100); # Robert Israel, Sep 06 2016
-
Nest[Append[#1, #1[[-1]] + #1[[Floor@ #3]] + #[[Ceiling@ #3]] ] & @@ {#1, #2, #2/2} & @@ {#, Length@ # + 1} &, {1}, 42] (* Michael De Vlieger, Jan 16 2020 *)
A322156
Irregular triangle where row n includes all decreasing sequences S = {k_0 = n, k_1, k_2, ..., k_m} in reverse lexicographic order such that the sum of subsequent terms k_j for all i < j <= m does not exceed any k_i.
Original entry on oeis.org
1, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 3, 3, 1, 3, 1, 1, 3, 2, 3, 2, 1, 3, 3, 4, 4, 1, 4, 1, 1, 4, 2, 4, 2, 1, 4, 2, 1, 1, 4, 2, 2, 4, 3, 4, 3, 1, 4, 4, 5, 5, 1, 5, 1, 1, 5, 2, 5, 2, 1, 5, 2, 1, 1, 5, 2, 2, 5, 3, 5, 3, 1, 5, 3, 1, 1, 5, 3, 2, 5, 4, 5, 4, 1, 5, 5, 6, 6, 1, 6, 1, 1, 6, 2, 6, 2, 1, 6, 2, 1, 1, 6, 2, 2, 6
Offset: 1
Triangle begins:
1; 1,1;
2; 2,1; 2,1,1; 2,2;
3; 3,1; 3,1,1; 3,2; 3,2,1; 3,3;
4; 4,1; 4,1,1; 4,2; 4,2,1; 4,2,1,1; 4,2,2; 4,3; 4,3,1; 4,4;
...
Row n = 5 starts with S_1 = 5. We append 1 to get {5,1}. 1 does not exceed 5, thus S_2 = {5,1}. We append 1 to get {5,1,1}. A = {1,2}; {5,1}-{2,1} = {3,0}, thus S_3 = {5,1,1} and we drop the last term and increment the new last term to get {5,2}. S_4 = {5,2}, and the ensuing terms {5,2,1}, {5,2,1,1}, {5,2,2} enter into the row. Since there are repeated terms at the last sequence, we drop the last term and increment the new last to get {5,3}. The terms {5,3,1}, {5,3,1,1}, {5,3,2}, {5,3,2,1}, are admitted. {5,3,2,1,1} has A = {1,2,4,6}. {5,3,2,1}-{6,4,2,1} = {-1,1,0,0}: {5,3,2,1,1} cannot be admitted, so we drop the last term and increment to {5,3,2,2} but the sum of the last two terms exceeds the second and we drop the last term and increment to {5,3,3}. For similar reasons, this cannot be admitted, so we drop the last term and increment to {5,4}. This enters as well as {5,4,1}. Since any appendage or increment proves invalid, we end up incrementing to {5,5}. The two terms are the same, therefore we end the row n = 5.
-
(* Generate sequence: *)
f[n_] := Block[{w = {n}, c}, c[x_] := Apply[Times, Most@ x - Reverse@ Accumulate@ Reverse@ Rest@ x]; Reap[Do[Which[And[Length@ w == 2, SameQ @@ w], Sow[w]; Break[], Length@ w == 1, Sow[w]; AppendTo[w, 1], c[w] > 0, Sow[w]; AppendTo[w, 1], True, Sow[w]; w = MapAt[1 + # &, Drop[w, -1], -1]], {i, Infinity}] ][[-1, 1]] ]; Array[f, 6] // Flatten
(* Convert S = row n to standard partition: *)
g[w_] := Block[{k}, k = Total@ w; Total@ Map[Apply[Function[{s, t}, s Array[Boole[t <= # <= s + t - 1] &, k] ], #] &, Apply[Join, Prepend[Table[Function[{v, c}, Map[{w[[k]], # + 1} &, Map[Total[v #] &, Tuples[{0, 1}, {Length@ v}]]]] @@ {Most@ #, ConstantArray[1, Length@ # - 1]} &@ Take[w, k], {k, 2, Length@ w}], {{w[[1]], 1}}]]] ]
A062188
a(n+1) = a(n) + a(floor(n/2)), with a(0)=0, a(1)=1.
Original entry on oeis.org
0, 1, 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 23, 28, 33, 40, 47, 56, 65, 77, 89, 104, 119, 138, 157, 180, 203, 231, 259, 292, 325, 365, 405, 452, 499, 555, 611, 676, 741, 818, 895, 984, 1073, 1177, 1281, 1400, 1519, 1657, 1795, 1952, 2109, 2289, 2469, 2672, 2875, 3106
Offset: 0
a(6) = a(5)+a(2) = 4+1 = 5.
a(7) = a(6)+a(3) = 5+2 = 7.
-
[n le 2 select n-1 else Self(n-1)+Self(Floor(n/2)): n in [1..60]]; // Vincenzo Librandi, Mar 03 2016
-
Join[{0}, Nest[Append[#, #[[-1]] + #[[Quotient[Length@#, 2]]]] &, {1, 1}, 53]] (* Ivan Neretin, Mar 03 2016 *)
-
from itertools import islice
from collections import deque
def A062188_gen(): # generator of terms
aqueue, f, b, a = deque([1]), True, 0, 1
yield from (0,1)
while True:
a += b
yield a
aqueue.append(a)
if f: b = aqueue.popleft()
f = not f
A062188_list = list(islice(A062188_gen(),40)) # Chai Wah Wu, Jun 08 2022
A092412
Fixed point of the morphism 0->11, 1->12, 2->13, 3->10, starting from a(1) = 1.
Original entry on oeis.org
1, 2, 1, 3, 1, 2, 1, 0, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 0, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 0, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 0, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 0, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 0, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 0
Offset: 1
-
Nest[ Function[ l, {Flatten[(l /. {0 -> {1, 1}, 1 -> {1, 2}, 2 -> {1, 3}, 3 -> {1, 0}})] }], {0}, 7] (* Robert G. Wilson v, Mar 04 2005 *)
SubstitutionSystem[{0 -> {1, 1}, 1 -> {1, 2}, 2 -> {1, 3}, 3 -> {1, 0}}, {1}, 7] // Last (* Jean-François Alcover, Sep 20 2019 *)
Mod[IntegerExponent[Range[100], 2] + 1, 4] (* Paolo Xausa, Feb 25 2025 *)
-
a(n)=(1 + valuation(n, 2)) %4; \\ Andrew Howroyd, Aug 06 2018
-
def A092412(n): return (n&-n).bit_length()&3 # Chai Wah Wu, Jul 13 2022
A022905
a(n) = M(n) + m(n) for n >= 2, where M(n) = max{ a(i) + a(n-i): i = 1..n-1 }, m(n) = min{ a(i) + a(n-i): i = 1..n-1 }.
Original entry on oeis.org
1, 4, 10, 19, 34, 55, 85, 124, 178, 247, 337, 448, 589, 760, 970, 1219, 1522, 1879, 2305, 2800, 3385, 4060, 4846, 5743, 6781, 7960, 9310, 10831, 12562, 14503, 16693, 19132, 21874, 24919, 28321, 32080, 36265, 40876, 45982, 51583, 57769
Offset: 1
-
a:= proc(n) option remember; `if`(n=1, 1,
a(n-1)+1+a(floor(n/2))+a(ceil(n/2)))
end:
seq(a(n), n=1..100); # Alois P. Heinz, Sep 17 2013
-
a[n_] := a[n] = If[n==1, 1, a[n-1]+1+a[Floor[n/2]]+a[Ceiling[n/2]]]; Array[a,100] (* Jean-François Alcover, Aug 07 2017, after Alois P. Heinz *)
-
from itertools import islice
from collections import deque
def A022905_gen(): # generator of terms
aqueue, f, b, a = deque([2]), True, 1, 2
yield 1
while True:
a += b
aqueue.append(a)
if f:
yield (3*a-1)//2
b = aqueue.popleft()
f = not f
A022905_list = list(islice(A022905_gen(),40)) # Chai Wah Wu, Jun 08 2022
Comments