A359900
Number of strict odd-length integer partitions of n whose parts do not have the same mean as median.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 4, 5, 4, 8, 10, 8, 15, 18, 17, 26, 27, 31, 43, 51, 53, 59, 81, 87, 109, 127, 115, 169, 194, 213, 255, 243, 322, 379, 431, 478, 487, 629, 667, 804, 907, 902, 1151, 1294, 1439, 1530, 1674, 2031, 2290, 2559, 2829, 2973, 3296, 3939
Offset: 0
The a(7) = 1 through a(16) = 15 partitions (A=10, B=11, C=12, D=13):
(421) (431) (621) (532) (542) (651) (643) (653) (762) (754)
(521) (541) (632) (732) (652) (743) (843) (763)
(631) (641) (831) (742) (752) (861) (853)
(721) (731) (921) (751) (761) (942) (862)
(821) (832) (842) (A32) (871)
(841) (851) (A41) (943)
(931) (932) (B31) (952)
(A21) (941) (C21) (961)
(A31) (A42)
(B21) (A51)
(B32)
(B41)
(C31)
(D21)
(64321)
The complement is counted by
A359899.
A008289 counts strict partitions by mean.
Cf.
A000016,
A065795,
A066571,
A102627,
A240850,
A240851,
A327475,
A359894,
A359906,
A359907,
A359910.
-
Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&OddQ[Length[#]]&&Mean[#]!=Median[#]&]],{n,0,30}]
A054599
a(n) = Sum_{d|n} d*2^(n/d - 1).
Original entry on oeis.org
0, 1, 4, 7, 16, 21, 52, 71, 160, 277, 564, 1035, 2176, 4109, 8348, 16467, 33088, 65553, 131740, 262163, 525456, 1048817, 2099244, 4194327, 8393344, 16777321, 33562676, 67109695, 134234480, 268435485, 536905572, 1073741855, 2147549824
Offset: 0
G.f. = x + 4*x^2 + 7*x^3 + 16*x^4 + 21*x^5 + 52*x^6 + 71*x^7 + 160*x^8 + 277*x^9 + ...
-
{0}~Join~Table[DivisorSum[n, 2^(n/# - 1) # &], {n, 1, 20}] (* Vladimir Reshetnikov, Nov 20 2015 *)
Table[SeriesCoefficient[-Log[-QPochhammer[2, x]] n/2, {x, 0, n}], {n, 0, 20}] (* Vladimir Reshetnikov, Nov 20 2015 *)
-
a(n) = if (n<1, 0, sumdiv(n, d, d*2^(n/d - 1))); \\ Michel Marcus, Nov 21 2015
A300190
Number of solutions to 1 +- 2 +- 3 +- ... +- n == 0 (mod n).
Original entry on oeis.org
1, 0, 2, 4, 4, 0, 10, 32, 30, 0, 94, 344, 316, 0, 1096, 4096, 3856, 0, 13798, 52432, 49940, 0, 182362, 699072, 671092, 0, 2485534, 9586984, 9256396, 0, 34636834, 134217728, 130150588, 0, 490853416, 1908874584, 1857283156, 0, 7048151672, 27487790720
Offset: 1
Solutions for n = 7:
--------------------------
1 +2 +3 +4 +5 +6 +7 = 28.
1 +2 +3 +4 +5 +6 -7 = 14.
1 +2 -3 +4 -5 -6 +7 = 0.
1 +2 -3 +4 -5 -6 -7 = -14.
1 +2 -3 -4 +5 +6 +7 = 14.
1 +2 -3 -4 +5 +6 -7 = 0.
1 -2 +3 +4 -5 +6 +7 = 14.
1 -2 +3 +4 -5 +6 -7 = 0.
1 -2 -3 -4 -5 +6 +7 = 0.
1 -2 -3 -4 -5 +6 -7 = -14.
Number of solutions to 1 +- 2^k +- 3^k +- ... +- n^k == 0 (mod n): this sequence (k=1),
A300268 (k=2),
A300269 (k=3).
-
b:= proc(n, i, m) option remember; `if`(i=0, `if`(n=0, 1, 0),
add(b(irem(n+j, m), i-1, m), j=[i, m-i]))
end:
a:= n-> b(0, n-1, n):
seq(a(n), n=1..60); # Alois P. Heinz, Mar 01 2018
-
b[n_, i_, m_] := b[n, i, m] = If[i == 0, If[n == 0, 1, 0], Sum[b[Mod[n + j, m], i - 1, m], {j, {i, m - i}}]];
a[n_] := b[0, n - 1, n];
Array[a, 60] (* Jean-François Alcover, Apr 29 2020, after Alois P. Heinz *)
-
def A(n)
ary = [1] + Array.new(n - 1, 0)
(1..n).each{|i|
i1 = 2 * i
a = ary.clone
(0..n - 1).each{|j| a[(j + i1) % n] += ary[j]}
ary = a
}
ary[(n * (n + 1) / 2) % n] / 2
end
def A300190(n)
(1..n).map{|i| A(i)}
end
p A300190(100)
A359898
Number of strict integer partitions of n whose parts do not have the same mean as median.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 4, 6, 5, 11, 12, 14, 21, 29, 26, 44, 44, 58, 68, 92, 92, 118, 137, 165, 192, 241, 223, 324, 353, 405, 467, 518, 594, 741, 809, 911, 987, 1239, 1276, 1588, 1741, 1823, 2226, 2566, 2727, 3138, 3413, 3905, 4450, 5093, 5434, 6134
Offset: 0
The a(7) = 1 through a(13) = 11 partitions:
(4,2,1) (4,3,1) (6,2,1) (5,3,2) (5,4,2) (6,5,1) (6,4,3)
(5,2,1) (5,4,1) (6,3,2) (7,3,2) (6,5,2)
(6,3,1) (6,4,1) (8,3,1) (7,4,2)
(7,2,1) (7,3,1) (9,2,1) (7,5,1)
(8,2,1) (6,3,2,1) (8,3,2)
(5,3,2,1) (8,4,1)
(9,3,1)
(10,2,1)
(5,4,3,1)
(6,4,2,1)
(7,3,2,1)
The complement is counted by
A359897.
A008289 counts strict partitions by mean.
-
Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&Mean[#]!=Median[#]&]],{n,0,30}]
A053633
Triangular array T(n,k) giving coefficients in expansion of Product_{j=1..n} (1+x^j) mod x^(n+1)-1.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 4, 3, 3, 3, 3, 6, 5, 5, 6, 5, 5, 10, 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16, 16, 30, 28, 28, 29, 28, 28, 29, 28, 28, 52, 51, 51, 51, 51, 52, 51, 51, 51, 51, 94, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 172, 170, 170, 172, 170, 170, 172
Offset: 0
Triangle begins:
k 0 1 2 3 4 5 6 7 8 9
n
0 1;
1 1, 1;
2 2, 1, 1;
3 2, 2, 2, 2;
4 4, 3, 3, 3, 3;
5 6, 5, 5, 6, 5, 5;
6 10, 9, 9, 9, 9, 9, 9;
7 16, 16, 16, 16, 16, 16, 16, 16;
8 30, 28, 28, 29, 28, 28, 29, 28, 28;
9 52, 51, 51, 51, 51, 52, 51, 51, 51, 51;
...
[Edited by _Seiichi Manyama_, Mar 11 2018]
- B. D. Ginsburg, On a number theory function applicable in coding theory, Problemy Kibernetiki, No. 19 (1967), pp. 249-252.
- Seiichi Manyama, Rows n = 0..139, flattened
- F. J. van de Bult, D. C. Gijswijt, J. P. Linderman, N. J. A. Sloane and Allan Wilks, A Slow-Growing Sequence Defined by an Unusual Recurrence, J. Integer Sequences, Vol. 10 (2007), #07.1.2.
- F. J. van de Bult, D. C. Gijswijt, J. P. Linderman, N. J. A. Sloane and Allan Wilks, A Slow-Growing Sequence Defined by an Unusual Recurrence [pdf, ps].
- N. J. A. Sloane, On single-deletion-correcting codes
- Index entries for sequences related to subset sums modulo m
- Index entries for sequences related to Gijswijt's sequence
-
with(numtheory): A053633 := proc(n,k) local t1,d; t1 := 0; for d from 1 to n do if n mod d = 0 and d mod 2 = 1 then t1 := t1+(1/(2*n))*2^(n/d)*phi(d)*mobius(d/gcd(d,k))/phi(d/gcd(d,k)); fi; od; t1; end;
-
Flatten[ Table[ CoefficientList[ PolynomialMod[ Product[1+x^j, {j,1,n}], x^(n+1)-1], x], {n,0,11}]] (* Jean-François Alcover, May 04 2011 *)
A053634
a(n) = Sum_{ d divides n } phi(d)*2^(n/d)/(2n).
Original entry on oeis.org
2, 3, 4, 7, 10, 18, 30, 54, 94, 176, 316, 591, 1096, 2058, 3856, 7301, 13798, 26244, 49940, 95373, 182362, 349626, 671092, 1290714, 2485534, 4793790, 9256396, 17896284, 34636834, 67109898, 130150588, 252647064, 490853416, 954440950
Offset: 3
-
a[n_] := DivisorSum[n, EulerPhi[#]*2^(n/#)&]/(2n); Table[a[n], {n, 3, 36}] (* Jean-François Alcover, Dec 07 2015 *)
-
a(n) = sumdiv (n, d, eulerphi(d)*2^(n/d)/(2*n)); \\ Michel Marcus, Sep 11 2013
A054598
a(0)=0; for n>0, a(n) = Sum_{d|n} d*2^(n/d).
Original entry on oeis.org
0, 2, 8, 14, 32, 42, 104, 142, 320, 554, 1128, 2070, 4352, 8218, 16696, 32934, 66176, 131106, 263480, 524326, 1050912, 2097634, 4198488, 8388654, 16786688, 33554642, 67125352, 134219390, 268468960, 536870970, 1073811144, 2147483710, 4295099648, 8589940890
Offset: 0
-
Table[CoefficientList[Series[-Log[-QPochhammer[2, x]], {x, 0, 60}], x][[n]] (n - 1), {n, 1, 60}] (* Benedict W. J. Irwin, Jun 23 2016 *)
-
a(n) = sumdiv(n, d, d*2^(n/d)); \\ Michel Marcus, Jul 01 2016
A327471
Number of subsets of {1..n} not containing their mean.
Original entry on oeis.org
1, 1, 2, 4, 10, 22, 48, 102, 214, 440, 900, 1830, 3706, 7486, 15092, 30380, 61100, 122780, 246566, 494912, 992984, 1991620, 3993446, 8005388, 16044460, 32150584, 64414460, 129037790, 258462026, 517641086, 1036616262, 2075721252, 4156096036, 8320912744, 16658202200
Offset: 0
The a(1) = 1 through a(5) = 22 subsets:
{} {} {} {} {}
{1,2} {1,2} {1,2} {1,2}
{1,3} {1,3} {1,3}
{2,3} {1,4} {1,4}
{2,3} {1,5}
{2,4} {2,3}
{3,4} {2,4}
{1,2,4} {2,5}
{1,3,4} {3,4}
{1,2,3,4} {3,5}
{4,5}
{1,2,4}
{1,2,5}
{1,3,4}
{1,4,5}
{2,3,5}
{2,4,5}
{1,2,3,4}
{1,2,3,5}
{1,2,4,5}
{1,3,4,5}
{2,3,4,5}
Subsets containing their mean are
A065795.
Subsets containing n but not their mean are
A327477.
Partitions not containing their mean are
A327472.
Strict partitions not containing their mean are
A240851.
-
Table[Length[Select[Subsets[Range[n]],!MemberQ[#,Mean[#]]&]],{n,0,10}]
-
from sympy import totient, divisors
def A327471(n): return (1<>(~k&k-1).bit_length(),generator=True))<<1)//k for k in range(1,n+1))>>1) # Chai Wah Wu, Feb 22 2023
A327474
Number of distinct means of subsets of {1..n}, where {} has mean 0.
Original entry on oeis.org
1, 2, 4, 6, 10, 16, 26, 38, 56, 78, 106, 138, 180, 226, 284, 348, 420, 500, 596, 698, 818, 946, 1086, 1236, 1408, 1588, 1788, 2000, 2230, 2472, 2742, 3020, 3328, 3652, 3996, 4356, 4740, 5136, 5568, 6018, 6492, 6982, 7512, 8054, 8638, 9242, 9870, 10520, 11216
Offset: 0
The a(3) = 6 distinct means are 0, 1, 3/2, 2, 5/2, 3.
The version for only nonempty subsets is
A135342.
-
a:= proc(n) option remember; `if`(n<4, [1, 2, 4, 6][n+1],
2*a(n-1)-a(n-2)+numtheory[phi](n-1))
end:
seq(a(n), n=0..50); # Alois P. Heinz, Feb 22 2023
-
Table[Length[Union[Mean/@Subsets[Range[n]]]],{n,0,10}]
-
from itertools import count, islice
from sympy import totient
def A327474_gen(): # generator of terms
a, b = 4, 6
yield from (1,2,4,6)
for n in count(3):
a, b = b, (b<<1)-a+totient(n)
yield b
A327474_list = list(islice(A327474_gen(),30)) # Chai Wah Wu, Feb 22 2023
A363526
Number of integer partitions of n with reverse-weighted sum 3*n.
Original entry on oeis.org
1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 4, 3, 2, 4, 4, 4, 5, 5, 4, 7, 7, 5, 8, 7, 6, 11, 9, 8, 11, 10, 10, 13, 12, 11, 15, 15, 12, 17, 16, 14, 20, 18, 16, 22, 20, 19, 24, 22, 20, 27, 26, 23, 29, 27, 25, 33, 30, 28, 35, 33, 31, 38, 36, 33, 41, 40
Offset: 0
The partition (6,4,4,1) has sum 15 and reverse-weighted sum 45 so is counted under a(15).
The a(n) partitions for n = {5, 10, 15, 16, 21, 24}:
(1,1,1,1,1) (4,3,2,1) (6,4,4,1) (6,5,4,1) (8,6,6,1) (9,7,7,1)
(2,2,2,2,2) (6,5,2,2) (6,6,2,2) (8,7,4,2) (9,8,5,2)
(7,3,3,2) (7,4,3,2) (9,5,5,2) (9,9,3,3)
(3,3,3,3,3) (9,6,3,3) (10,6,6,2)
(10,4,4,3) (10,7,4,3)
(11,5,5,3)
(12,4,4,4)
Positions of terms with omega > 4 appear to be
A079998.
The version for compositions is
A231429.
The non-reverse version is
A363527.
A318283 gives weighted sum of reversed prime indices, row-sums of
A358136.
Cf.
A000016,
A008284,
A067538,
A222855,
A222970,
A359755,
A360672,
A360675,
A362559,
A362560,
A363525,
A363528.
-
Table[Length[Select[IntegerPartitions[n],Total[Accumulate[#]]==3n&]],{n,0,30}]
Comments