A123151
a(n) = A000124(n)*a(n-3) for n > 2, otherwise n!.
Original entry on oeis.org
1, 1, 2, 7, 11, 32, 154, 319, 1184, 7084, 17864, 79328, 559636, 1643488, 8408768, 67715956, 225157856, 1294950272, 11647144432, 43005150496, 273234507392, 2702137508224, 10923308225984, 75685958547584, 813343389975424, 3560998481670784, 26641457408749568
Offset: 0
-
function a(n) // a = A123151
if n le 2 then return Factorial(n);
else return (n^2+n+2)*a(n-3)/2;
end if;
end function;
[a(n): n in [0..30]]; // G. C. Greubel, Jul 17 2023
-
a[n_]:= a[n]= If[n<3, n!, (1/2)*(n^2+n+2)*a[n-3]];
Table[a[n], {n,0,30}]
-
@CachedFunction # a = A123151
def a(n): return factorial(n) if (n<3) else (n^2+n+2)*a(n-3)/2
[a(n) for n in (0..30)] # G. C. Greubel, Jul 17 2023
Original entry on oeis.org
2, 4, 5, 8, 9, 10, 14, 15, 16, 17, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 44, 45, 46, 47, 48, 49, 50, 58, 59, 60, 61, 62, 63, 64, 65, 74, 75, 76, 77, 78, 79, 80, 81, 82, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121
Offset: 1
A204009
a(n) is a binary vector for selecting distinct terms from A000124 that when summed give n; it uses the greedy algorithm.
Original entry on oeis.org
0, 1, 10, 11, 100, 101, 110, 1000, 1001, 1010, 1011, 10000, 10001, 10010, 10011, 10100, 100000, 100001, 100010, 100011, 100100, 100101, 1000000, 1000001, 1000010, 1000011, 1000100, 1000101, 1000110, 10000000, 10000001, 10000010, 10000011, 10000100
Offset: 0
14 can be written as 7+4+2+1, i.e., 1111, or as 11+2+1, i.e., 10011, and the latter is chosen because it uses the greedy algorithm for selection.
- Wikipedia, "Complete" sequence. [Wikipedia calls a sequence "complete" (sic) if every positive integer is a sum of distinct terms. This name is extremely misleading and should be avoided. - _N. J. A. Sloane_, May 20 2023]
-
complete[m_Integer] := (m(m+1)/2+1); gentable[n_Integer] := (m=n; ptable={0}; While[m!=0, (i=0; While[complete[i]<=m&&ptable[[i+1]]!=1, (AppendTo[ptable, 0]; i++)]; ptable[[i]]=1; m=m-complete[i-1])]; ptable); decimal[n_Integer] := (gentable[n]; Sum[2^(k-1)*ptable[[k]], {k, 1, Length[ptable]}]); Table[IntegerString[decimal[s], 2], {s, 0, 100}]
A271861
Recursive sequence based on the central polygonal numbers (A000124) and A002260.
Original entry on oeis.org
1, 2, 3, 5, 4, 7, 9, 8, 10, 12, 15, 14, 6, 16, 19, 11, 13, 18, 21, 24, 20, 28, 27, 25, 22, 30, 23, 34, 37, 36, 26, 29, 33, 17, 41, 44, 40, 39, 32, 35, 45, 31, 49, 52, 48, 55, 54, 51, 38, 46, 50, 58, 61, 57, 64, 67, 66, 56, 43, 59, 47, 68, 71, 63, 74, 77, 81
Offset: 1
Start with the natural numbers:
1, 2, 3, 4, 5, 6, 7, 8, 9...
a(A002260(1))=1, so reverse the order of the next term, leaving the sequence unchanged:
(1)
1, (2), 3, 4, 5, 6, 7, 8, 9...
a(A002260(2))=1, so reverse the order of the next term, leaving the sequence unchanged:
(1)
1, 2, (3), 4, 5, 6, 7, 8, 9...
a(A002260(3))=2, so reverse the order of the next 2 terms:
(2)
1, 2, 3, (5, 4), 6, 7, 8, 9...
a(A002260(4))=1, so reverse the order of the next term, leaving the sequence unchanged:
(1)
1, 2, 3, 5, (4), 6, 7, 8, 9...
a(A002260(5))=2, so reverse the order of the next 2 terms:
(2)
1, 2, 3, 5, 4, (7, 6), 8, 9...
a(A002260(6))=3, so reverse the order of the next 3 terms:
(3)
1, 2, 3, 5, 4, 7, (9, 8, 6)...
A271863
Recursive sequence based on the central polygonal numbers (A000124) and A004736.
Original entry on oeis.org
1, 2, 4, 3, 8, 6, 7, 10, 12, 5, 11, 19, 16, 14, 18, 15, 22, 25, 17, 9, 24, 13, 29, 23, 32, 28, 26, 31, 27, 39, 20, 38, 40, 33, 35, 30, 34, 49, 36, 46, 37, 21, 45, 43, 48, 44, 51, 59, 41, 56, 42, 50, 55, 53, 58, 54, 67, 62, 70, 64, 57, 65, 63, 52, 60, 69, 47
Offset: 1
Start with the natural numbers:
1, 2, 3, 4, 5, 6, 7, 8...
a(A004736(1))=1, so reverse the order of the next term, leaving the sequence unchanged:
(1)
1, (2), 3, 4, 5, 6, 7, 8...
a(A004736(2))=2, so reverse the order of the next 2 terms:
(2)
1, 2, (4, 3), 5, 6, 7, 8, 9...
a(A004736(3))=1, so reverse the order of the next term, leaving the sequence unchanged:
(1)
1, 2, 4, (3), 5, 6, 7, 8...
a(A004736(4))=4, so reverse the order of the next 4 terms:
(4)
1, 2, 4, 3, (8, 7, 6, 5)...
a(A004736(5))=2, so reverse the order of the next 2 terms:
(2)
1, 2, 4, 3, 8, (6, 7), 5...
a(A004736(6))=1, so reverse the order of the next term, leaving the sequence unchanged:
(1)
1, 2, 4, 3, 8, 6, (7), 5...
A271865
Recursive sequence based on the central polygonal numbers (A000124) and A004738.
Original entry on oeis.org
1, 2, 4, 3, 6, 9, 7, 8, 10, 13, 5, 15, 12, 14, 16, 19, 11, 23, 20, 17, 22, 18, 24, 27, 21, 31, 35, 28, 32, 34, 26, 33, 29, 37, 25, 41, 45, 39, 47, 30, 44, 46, 42, 40, 36, 49, 43, 53, 57, 51, 58, 50, 61, 54, 52, 60, 55, 59, 38, 63, 56, 67, 71, 65, 72, 75, 70
Offset: 1
Start with the natural numbers:
1, 2, 3, 4, 5, 6, 7, 8, 9...
a(A004738(1))=1, so reverse the order of the next term, leaving the sequence unchanged:
(1)
1, (2), 3, 4, 5, 6, 7, 8, 9...
a(A004738(2))=2, so reverse the order of the next 2 terms:
(2)
1, 2, (4, 3), 5, 6, 7, 8, 9...
a(A004738(3))=1, so reverse the order of the next term, leaving the sequence unchanged:
(1)
1, 2, 4, (3), 5, 6, 7, 8, 9...
a(A004738(4))=2, so reverse the order of the next 2 terms:
(2)
1, 2, 4, 3, (6, 5), 7, 8, 9...
a(A004738(5))=4, so reverse the order of the next 4 terms:
(4)
1, 2, 4, 3, 6, (9, 8, 7, 5)...
a(A004738(6))=2, so reverse the order of the next 2 terms:
(2)
1, 2, 4, 3, 6, 9, (7, 8), 5...
a(A004738(7))=1, so reverse the order of the next term, leaving the sequence unchanged:
(1)
1, 2, 4, 3, 6, 9, 7, (8), 5...
A161254
Number of partitions of n into central polygonal numbers A000124.
Original entry on oeis.org
1, 1, 2, 2, 4, 4, 6, 7, 10, 11, 14, 17, 21, 24, 29, 34, 41, 46, 55, 62, 73, 81, 96, 107, 124, 137, 158, 175, 199, 221, 250, 276, 310, 343, 383, 421, 469, 516, 572, 626, 693, 757, 833, 908, 1000, 1088, 1192, 1294, 1417, 1535, 1674, 1813, 1974, 2133, 2315, 2501, 2710, 2921
Offset: 0
1 + x + 2*x^2 + 2*x^3 + 4*x^4 + 4*x^5 + 6*x^6 + 7*x^7 + 10*x^8 + 11*x^9 + ...
a(4) = 4 since 4 = 2 + 2 = 2 + 1 + 1 = 1 + 1 + 1 + 1 is a partition in 4 ways. a(7) = 7 since 7 = 4 + 2 + 1 = 4 + 1 + 1 + 1 = 2 + 2 + 2 + 1 = 2 + 2 + 1 + 1 + 1 = 2 + 1 + 1 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1 + 1 is a partition in 7 ways. - _Michael Somos_, May 29 2012
A161255
Number of partitions of n into central polygonal numbers A000124 where every part appears at least 2 times.
Original entry on oeis.org
0, 1, 1, 2, 1, 3, 2, 5, 3, 6, 5, 9, 6, 12, 9, 16, 12, 20, 16, 26, 21, 33, 27, 41, 35, 50, 43, 62, 54, 75, 66, 91, 82, 108, 99, 131, 120, 154, 144, 183, 172, 214, 204, 254, 240, 294, 284, 344, 331, 398, 387, 462, 449, 531, 521, 612, 600, 702, 690, 803, 792, 915, 905, 1043
Offset: 1
A161256
Number of partitions of n into central polygonal numbers A000124 where every part appears at least 3 times.
Original entry on oeis.org
0, 0, 1, 1, 1, 2, 1, 2, 2, 3, 3, 5, 4, 5, 6, 8, 7, 9, 9, 12, 12, 14, 14, 19, 18, 22, 23, 28, 27, 32, 34, 40, 42, 47, 48, 57, 58, 66, 69, 78, 81, 89, 94, 106, 111, 120, 128, 143, 148, 161, 170, 187, 196, 214, 225, 244, 257, 277, 294, 319, 335, 357, 377, 409, 428, 460, 483, 519, 546, 582
Offset: 1
A161257
Number of partitions of n into central polygonal numbers A000124 where every part appears at least 4 times.
Original entry on oeis.org
0, 0, 0, 1, 1, 1, 1, 2, 1, 2, 1, 3, 2, 4, 3, 6, 4, 6, 5, 9, 7, 9, 8, 13, 10, 13, 11, 19, 14, 19, 16, 26, 21, 28, 25, 36, 29, 39, 34, 49, 41, 55, 48, 66, 56, 71, 65, 86, 78, 94, 87, 111, 99, 121, 113, 143, 128, 155, 146, 180, 165, 196, 189, 226, 211, 246, 237, 281, 267, 310, 300, 351, 334
Offset: 1
Showing 1-10 of 436 results.
Comments