A078374
Number of partitions of n into distinct and relatively prime parts.
Original entry on oeis.org
1, 0, 1, 1, 2, 2, 4, 4, 6, 7, 11, 10, 17, 17, 23, 26, 37, 36, 53, 53, 70, 77, 103, 103, 139, 147, 184, 199, 255, 260, 339, 358, 435, 474, 578, 611, 759, 810, 963, 1045, 1259, 1331, 1609, 1726, 2015, 2200, 2589, 2762, 3259, 3509, 4058, 4416, 5119, 5488, 6364, 6882
Offset: 1
From _Gus Wiseman_, Oct 18 2020: (Start)
The a(1) = 1 through a(13) = 17 partitions (empty column indicated by dot, A = 10, B = 11, C = 12):
1 . 21 31 32 51 43 53 54 73 65 75 76
41 321 52 71 72 91 74 B1 85
61 431 81 532 83 543 94
421 521 432 541 92 651 A3
531 631 A1 732 B2
621 721 542 741 C1
4321 632 831 643
641 921 652
731 5421 742
821 6321 751
5321 832
841
931
A21
5431
6421
7321
(End)
A000837 is the not necessarily strict version.
A302796 gives the Heinz numbers of these partitions.
A305713 is the pairwise coprime instead of relatively prime version.
A000740 counts relatively prime compositions.
Cf.
A007359,
A101268,
A289508,
A289509,
A291166,
A298748,
A337451,
A337485,
A337451,
A337561,
A337563.
-
Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&GCD@@#==1&]],{n,15}] (* Gus Wiseman, Oct 18 2020 *)
A000212
a(n) = floor(n^2/3).
Original entry on oeis.org
0, 0, 1, 3, 5, 8, 12, 16, 21, 27, 33, 40, 48, 56, 65, 75, 85, 96, 108, 120, 133, 147, 161, 176, 192, 208, 225, 243, 261, 280, 300, 320, 341, 363, 385, 408, 432, 456, 481, 507, 533, 560, 588, 616, 645, 675, 705, 736, 768, 800, 833, 867, 901, 936
Offset: 0
G.f. = x^2 + 3*x^3 + 5*x^4 + 8*x^5 + 12*x^6 + 16*x^7 + 21*x^8 + 27*x^9 + 33*x^10 + ...
From _Gus Wiseman_, Oct 07 2020: (Start)
The a(2) = 1 through a(6) = 12 partitions of 2*n into exactly 3 parts (Barker) are the following. The Heinz numbers of these partitions are given by the intersection of A014612 (triples) and A300061 (even sum).
(2,1,1) (2,2,2) (3,3,2) (4,3,3) (4,4,4)
(3,2,1) (4,2,2) (4,4,2) (5,4,3)
(4,1,1) (4,3,1) (5,3,2) (5,5,2)
(5,2,1) (5,4,1) (6,3,3)
(6,1,1) (6,2,2) (6,4,2)
(6,3,1) (6,5,1)
(7,2,1) (7,3,2)
(8,1,1) (7,4,1)
(8,2,2)
(8,3,1)
(9,2,1)
(10,1,1)
(End)
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Vincenzo Librandi, Table of n, a(n) for n = 0..5000
- Kevin Beanland, Hung Viet Chu, and Carrie E. Finch-Smith, Generalized Schreier sets, linear recurrence relation, Turán graphs, arXiv:2112.14905 [math.CO], 2021.
- Rafael Durbano Lobato, Recursive partitioning approach for the Manufacturer's Pallet Loading Problem.
- Bakir Farhi, On the Representation of the Natural Numbers as the Sum of Three Terms of the Sequence floor(n^2/a), Journal of Integer Sequences, Vol. 16 (2013), Article 13.6.4.
- Bakir Farhi, An Elementary Proof that any Natural Number can be Written as the Sum of Three Terms of the Sequence floor(n^2/3), Journal of Integer Sequences, Vol. 17 (2014), Article 14.7.6.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
- Katherine E. Stange, Integral points on elliptic curves and explicit valuations of division polynomials arXiv:1108.3051v3 [math.NT], 2011-2014.
- C. K. Wong and Don Coppersmith, A combinatorial problem related to multimodule memory organizations, J. ACM 21 (1974), 392-402.
- Anton Zakharov, Cevians.
- Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
Cf.
A033436 (= R_n(1,4) = R_n(3,4)),
A033437 (= R_n(1,5) = R_n(4,5)),
A033438 (= R_n(1,6) = R_n(5,6)),
A033439 (= R_n(1,7) = R_n(6,7)),
A033440,
A033441,
A033442,
A033443,
A033444.
A000217(n-2) counts 3-part compositions.
A069905 counts the 3-part partitions.
A211540 counts strict 3-part partitions.
A337453 ranks strict 3-part compositions.
A001399(n-6)*4 is the strict version.
A001840(n-4) is the non-unimodal version.
A001399(n-6)*2 is the strict non-unimodal version.
A011782 counts unimodal permutations.
A335373 is the complement of a ranking sequence for unimodal compositions.
-
[Floor(n^2 / 3): n in [0..50]]; // Vincenzo Librandi, May 08 2011
-
A000212:=(-1+z-2*z**2+z**3-2*z**4+z**5)/(z**2+z+1)/(z-1)**3; # Conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence with an additional leading 1.
A000212 := proc(n) option remember; `if`(n<4, [0,0,1,3][n+1], a(n-1)+a(n-3) -a(n-4)+2) end; # Peter Luschny, Nov 20 2011
-
Table[Quotient[n^2, 3], {n, 0, 59}] (* Michael Somos, Jan 22 2014 *)
-
{a(n) = n^2 \ 3}; /* Michael Somos, Sep 25 2006 */
-
def A000212(n): return n**2//3 # Chai Wah Wu, Jun 07 2022
A014311
Numbers with exactly 3 ones in binary expansion.
Original entry on oeis.org
7, 11, 13, 14, 19, 21, 22, 25, 26, 28, 35, 37, 38, 41, 42, 44, 49, 50, 52, 56, 67, 69, 70, 73, 74, 76, 81, 82, 84, 88, 97, 98, 100, 104, 112, 131, 133, 134, 137, 138, 140, 145, 146, 148, 152, 161, 162, 164, 168, 176, 193, 194, 196, 200, 208, 224, 259, 261, 262, 265, 266, 268, 273, 274, 276, 280, 289, 290, 292, 296, 304
Offset: 1
Al Black (gblack(AT)nol.net)
Cf.
A000079,
A018900,
A014311,
A014312,
A014313,
A023688,
A023689,
A023690,
A023691 (Hammingweight = 1, 2, ..., 9).
A000217(n-2) counts compositions into three parts.
A033992 lists numbers divisible by exactly three different primes.
A323024 lists numbers with exactly three different prime multiplicities.
-
unsigned hakmem175(unsigned x) {
unsigned s, o, r;
s = x & -x; r = x + s;
o = r ^ x; o = (o >> 2) / s;
return r | o;
}
unsigned A014311(int n) {
if (n == 1) return 7;
return hakmem175(A014311(n - 1));
} // Peter Luschny, Jan 01 2014
-
a014311 n = a014311_list !! (n-1)
a014311_list = [2^x + 2^y + 2^z |
x <- [2..], y <- [1..x-1], z <- [0..y-1]]
-- Reinhard Zumkeller, May 03 2012
-
Select[Range[200], (Count[IntegerDigits[#, 2], 1] == 3)&]
nn = 8; Flatten[Table[2^i + 2^j + 2^k, {i, 2, nn}, {j, 1, i - 1}, {k, 0, j - 1}]] (* T. D. Noe, Nov 05 2013 *)
-
for(n=0,10^3,if(hammingweight(n)==3,print1(n,", "))); \\ Joerg Arndt, Mar 04 2014
-
print1(t=7);for(i=2,50,print1(","t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
-
A014311_list = [2**a+2**b+2**c for a in range(2,6) for b in range(1,a) for c in range(b)] # Chai Wah Wu, Jan 24 2021
-
from itertools import islice
def A014311_gen(): # generator of terms
yield (n:=7)
while True: yield (n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
A014311_list = list(islice(A014311_gen(),20)) # Chai Wah Wu, Mar 10 2025
-
from math import isqrt, comb
from sympy import integer_nthroot
def A014311(n): return (1<<(r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(t:=(n>comb(m+2,3)))+1,3))-comb((k:=isqrt(b:=r+1<<1))+(b>k*(k+1)),2))+(1<<(a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1))+(1<Chai Wah Wu, Mar 10 2025
A101268
Number of compositions of n into pairwise relatively prime parts.
Original entry on oeis.org
1, 1, 2, 4, 7, 13, 22, 38, 63, 101, 160, 254, 403, 635, 984, 1492, 2225, 3281, 4814, 7044, 10271, 14889, 21416, 30586, 43401, 61205, 85748, 119296, 164835, 226423, 309664, 422302, 574827, 781237, 1060182, 1436368, 1942589, 2622079, 3531152, 4742316, 6348411
Offset: 0
From _Gus Wiseman_, Oct 18 2020: (Start)
The a(1) = 1 through a(5) = 13 compositions:
(1) (2) (3) (4) (5)
(11) (12) (13) (14)
(21) (31) (23)
(111) (112) (32)
(121) (41)
(211) (113)
(1111) (131)
(311)
(1112)
(1121)
(1211)
(2111)
(11111)
(End)
A337461 counts these compositions of length 3, with unordered version
A307719 and unordered strict version
A220377.
A337462 does not consider a singleton to be coprime unless it is (1), with strict version
A337561.
A337664 looks only at distinct parts, with non-constant version
A337665.
A000740 counts relatively prime compositions, with strict case
A332004.
A178472 counts compositions with a common factor.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]<=1||CoprimeQ@@#&]],{n,0,10}] (* Gus Wiseman, Oct 18 2020 *)
A220377
Number of partitions of n into three distinct and mutually relatively prime parts.
Original entry on oeis.org
1, 0, 2, 1, 3, 1, 6, 1, 7, 3, 7, 3, 14, 3, 15, 6, 14, 6, 25, 6, 22, 10, 25, 9, 42, 8, 34, 15, 37, 15, 53, 13, 48, 22, 53, 17, 78, 17, 65, 30, 63, 24, 99, 24, 88, 35, 84, 30, 126, 34, 103, 45, 103, 38, 166, 35, 124, 57, 128, 51, 184, 44, 150, 67, 172, 52, 218
Offset: 6
For n=10 we have three such partitions: 1+2+7, 1+4+5 and 2+3+5.
From _Gus Wiseman_, Oct 14 2020: (Start)
The a(6) = 1 through a(20) = 15 triples (empty column indicated by dot, A..H = 10..17):
321 . 431 531 532 731 543 751 743 753 754 971 765 B53 875
521 541 651 752 951 853 B51 873 B71 974
721 732 761 B31 871 D31 954 D51 A73
741 851 952 972 A91
831 941 B32 981 B54
921 A31 B41 A71 B72
B21 D21 B43 B81
B52 C71
B61 D43
C51 D52
D32 D61
D41 E51
E31 F41
F21 G31
H21
(End)
A101271 is the relative prime instead of pairwise coprime version.
A305713 counts these partitions of any length, with Heinz numbers
A302797.
A337461 is the non-strict ordered version.
A337605 is the pairwise non-coprime instead of pairwise coprime version.
A001399(n-6) counts strict 3-part partitions, with Heinz numbers
A007304.
A008284 counts partitions by sum and length, with strict case
A008289.
A318717 counts pairwise non-coprime strict partitions.
A326675 ranks pairwise coprime sets.
A327516 counts pairwise coprime partitions.
A337601 counts 3-part partitions whose distinct parts are pairwise coprime.
-
Table[Length@Select[ IntegerPartitions[ n, {3}], #[[1]] != #[[2]] != #[[3]] && GCD[#[[1]], #[[2]]] == 1 && GCD[#[[1]], #[[3]]] == 1 && GCD[#[[2]], #[[3]]] == 1 &], {n, 6, 100}]
Table[Count[IntegerPartitions[n,{3}],?(CoprimeQ@@#&&Length[ Union[#]] == 3&)],{n,6,100}] (* _Harvey P. Dale, May 22 2020 *)
-
a(n)=my(P=partitions(n));sum(i=1,#P,#P[i]==3&&P[i][1]Charles R Greathouse IV, Dec 14 2012
A302698
Number of integer partitions of n into relatively prime parts that are all greater than 1.
Original entry on oeis.org
0, 0, 0, 0, 1, 0, 3, 2, 5, 4, 13, 7, 23, 18, 32, 33, 65, 50, 104, 92, 148, 153, 252, 226, 376, 376, 544, 570, 846, 821, 1237, 1276, 1736, 1869, 2552, 2643, 3659, 3887, 5067, 5509, 7244, 7672, 10086, 10909, 13756, 15168, 19195, 20735, 26237, 28708, 35418, 39207
Offset: 1
The a(5) = 1 through a(12) = 7 partitions (empty column indicated by dot):
(32) . (43) (53) (54) (73) (65) (75)
(52) (332) (72) (433) (74) (543)
(322) (432) (532) (83) (552)
(522) (3322) (92) (732)
(3222) (443) (4332)
(533) (5322)
(542) (33222)
(632)
(722)
(3332)
(4322)
(5222)
(32222)
A000837 is the version allowing 1's.
A002865 does not require relative primality.
A302697 gives the Heinz numbers of these partitions.
A337451 is the ordered strict version.
A337485 is the pairwise coprime instead of relatively prime version.
A000740 counts relatively prime compositions.
A078374 counts relatively prime strict partitions.
A212804 counts compositions with no 1's.
A291166 appears to rank relatively prime compositions.
A332004 counts strict relatively prime compositions.
A337561 counts pairwise coprime strict compositions.
-
b:= proc(n, i, g) option remember; `if`(n=0, `if`(g=1, 1, 0),
`if`(i<2, 0, b(n, i-1, g)+b(n-i, min(n-i, i), igcd(g, i))))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=1..60); # Alois P. Heinz, Apr 12 2018
-
Table[Length[Select[IntegerPartitions[n],FreeQ[#,1]&&GCD@@#===1&]],{n,30}]
(* Second program: *)
b[n_, i_, g_] := b[n, i, g] = If[n == 0, If[g == 1, 1, 0], If[i < 2, 0, b[n, i - 1, g] + b[n - i, Min[n - i, i], GCD[g, i]]]];
a[n_] := b[n, n, 0];
Array[a, 60] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)
A337485
Number of pairwise coprime integer partitions of n with no 1's, where a singleton is not considered coprime unless it is (1).
Original entry on oeis.org
0, 0, 0, 0, 0, 1, 0, 2, 1, 2, 2, 4, 3, 5, 4, 4, 7, 8, 9, 10, 10, 9, 13, 17, 18, 17, 19, 19, 24, 29, 34, 33, 31, 31, 42, 42, 56, 55, 50, 54, 66, 77, 86, 86, 79, 81, 96, 124, 127, 126, 127, 126, 145, 181, 190, 184, 183, 192, 212, 262, 289, 278, 257, 270, 311
Offset: 0
The a(n) partitions for n = 5, 7, 12, 13, 16, 17, 18, 19 (A..H = 10..17):
(3,2) (4,3) (7,5) (7,6) (9,7) (9,8) (B,7) (A,9)
(5,2) (5,4,3) (8,5) (B,5) (A,7) (D,5) (B,8)
(7,3,2) (9,4) (D,3) (B,6) (7,6,5) (C,7)
(A,3) (7,5,4) (C,5) (8,7,3) (D,6)
(B,2) (8,5,3) (D,4) (9,5,4) (E,5)
(9,5,2) (E,3) (9,7,2) (F,4)
(B,3,2) (F,2) (B,4,3) (G,3)
(7,5,3,2) (B,5,2) (H,2)
(D,3,2) (B,5,3)
(7,5,4,3)
A007359 considers all singletons to be coprime.
A337452 is the relatively prime instead of pairwise coprime version, with non-strict version
A302698.
A337563 is the restriction to partitions of length 3.
A002865 counts partitions with no 1's.
A078374 counts relatively prime strict partitions.
-
Table[Length[Select[IntegerPartitions[n],!MemberQ[#,1]&&CoprimeQ@@#&]],{n,0,30}]
A337462
Number of pairwise coprime compositions of n, where a singleton is not considered coprime unless it is (1).
Original entry on oeis.org
1, 1, 1, 3, 6, 12, 21, 37, 62, 100, 159, 253, 402, 634, 983, 1491, 2224, 3280, 4813, 7043, 10270, 14888, 21415, 30585, 43400, 61204, 85747, 119295, 164834, 226422, 309663, 422301, 574826, 781236, 1060181, 1436367, 1942588, 2622078, 3531151, 4742315, 6348410
Offset: 0
The a(1) = 1 through a(5) = 12 compositions:
(1) (1,1) (1,2) (1,3) (1,4)
(2,1) (3,1) (2,3)
(1,1,1) (1,1,2) (3,2)
(1,2,1) (4,1)
(2,1,1) (1,1,3)
(1,1,1,1) (1,3,1)
(3,1,1)
(1,1,1,2)
(1,1,2,1)
(1,2,1,1)
(2,1,1,1)
(1,1,1,1,1)
A000740 counts the relatively prime instead of pairwise coprime version.
A101268 considers all singletons to be coprime, with strict case
A337562.
A337461 counts these compositions of length 3.
A051424 counts pairwise coprime or singleton partitions.
A101268 counts pairwise coprime or singleton compositions.
A178472 counts compositions with a common factor.
A305713 counts strict pairwise coprime partitions.
A328673 counts pairwise non-coprime partitions.
A333228 ranks compositions whose distinct parts are pairwise coprime.
A337667 counts pairwise non-coprime compositions.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],#=={}||CoprimeQ@@#&]],{n,0,10}]
A337605
Number of unordered triples of distinct positive integers summing to n, any two of which have a common divisor > 1.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 4, 0, 4, 1, 5, 0, 9, 0, 8, 3, 10, 0, 17, 1, 14, 5, 16, 1, 25, 1, 21, 8, 26, 2, 37, 1, 30, 15, 33, 2, 49, 2, 44, 16, 44, 2, 64, 6, 54, 21, 56, 3, 87, 5, 65, 30, 70, 9, 101, 5, 80, 34, 98, 6, 121, 6, 96, 52
Offset: 0
The a(n) triples for n = 12, 16, 18, 22, 27, 55:
(6,4,2) (8,6,2) (8,6,4) (10,8,4) (12,9,6) (28,21,6)
(10,4,2) (9,6,3) (12,6,4) (15,9,3) (30,20,5)
(10,6,2) (12,8,2) (18,6,3) (35,15,5)
(12,4,2) (14,6,2) (40,10,5)
(16,4,2) (25,20,10)
(30,15,10)
A220377 is the coprime instead of non-coprime version.
A337604 is the ordered non-strict version.
A023023 counts relatively prime 3-part partitions
A051424 counts pairwise coprime or singleton partitions.
A307719 counts pairwise coprime 3-part partitions.
-
stabQ[u_,Q_]:=Array[#1==#2||!Q[u[[#1]],u[[#2]]]&,{Length[u],Length[u]},1,And];
Table[Length[Select[IntegerPartitions[n,{3}],UnsameQ@@#&&stabQ[#,CoprimeQ]&]],{n,0,100}]
A337563
Number of pairwise coprime unordered triples of positive integers > 1 summing to n.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 2, 1, 4, 0, 7, 1, 7, 3, 9, 2, 15, 3, 13, 5, 17, 4, 29, 5, 20, 8, 28, 8, 42, 8, 31, 14, 42, 10, 59, 12, 45, 21, 52, 14, 77, 17, 68, 26, 69, 19, 101, 26, 84, 34, 86, 25, 138, 28, 95, 43, 111, 36, 161, 35, 118, 52, 151
Offset: 0
The a(10) = 1 through a(24) = 15 triples (empty columns indicated by dots, A..J = 10..19):
532 . 543 . 743 753 754 . 765 B53 875 975 985 B75 987
732 752 853 873 974 B73 B65 D73 B76
952 954 A73 D53 B74 B85
B32 972 B54 B83 B94
B43 B72 B92 BA3
B52 D43 D54 C75
D32 D52 D72 D65
E53 D74
H32 D83
D92
F72
G53
H43
H52
J32
A337485 counts these partitions of any length.
A007359 counts pairwise coprime partitions with no 1's.
A078374 counts relatively prime strict partitions.
A302696 ranks pairwise coprime partitions.
A302698 counts relatively prime partitions with no 1's.
A305713 counts pairwise coprime strict partitions.
A327516 counts pairwise coprime partitions.
A337452 counts relatively prime strict partitions with no 1's.
Cf.
A007304,
A082024,
A101268,
A284825,
A332004,
A337451,
A337461,
A337462,
A337561,
A337599,
A337601,
A337605.
-
Table[Length[Select[IntegerPartitions[n,{3}],!MemberQ[#,1]&&CoprimeQ@@#&]],{n,0,30}]
Showing 1-10 of 31 results.
Comments