login
Numbers m such that the only normal integer partition of m whose run-lengths are a palindrome is (1)^m.
2

%I #26 Mar 02 2021 03:18:35

%S 0,1,2,4,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,

%T 89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,

%U 179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269

%N Numbers m such that the only normal integer partition of m whose run-lengths are a palindrome is (1)^m.

%C An integer partition is normal if it covers an initial interval of positive integers.

%C Conjecture: The sequence consists of 0, 1, 4, and all primes except 3.

%C From _Chai Wah Wu_, Jun 22 2020: (Start)

%C The above conjecture is true.

%C Proof: The cases of 0, 1, 4 can be checked by inspection. Next we show that if n is prime and not equal to 3, then n is a term. Let n be prime and consider a palindromic normal partition of n covering the integers 1,...,k with k > 1. Then the multiplicity of 1 and k are the same and the multiplicities of 2 and k-1 are the same, etc.

%C If k is even, then n is of the form (k+1)r. Since n is prime, this implies that n = k+1. Since n >= k(k+1)/2. this means that k = 2 and n = 3.

%C If k is odd, then n is of the form (k+1)r + w(k+1)/2. Let m = (k+1)/2, then n = m(2r+w). Since n is prime and r,w > 0, this means that m = 1, k = 1, a contradiction.

%C Next we show that if n is composite and not equal to 4, then n is not a term.

%C Suppose n = pq for 1 < p <= q. If p is odd, let k = p-1 > 1.

%C Consider the partition covering 1,..,k where the multiplicity is 1 except for 1 and k where the multiplicity is q-k/2 + 1 > 0. This is a normal palindromic partition summing up to pq = n.

%C If p is even, without loss of generality we can choose p = 2. Since n != 4, q >= 3. In this case, choosing k = 3 with 1 and 3 having multiplicity 1 and 2 having multiplicity q-2 > 0 results in a normal palindromic partition of 2q = n. QED

%C It is clear that if n is not a term, then any multiple of n is also not a term.

%C (End)

%F n is a term if and only if n = 0, 1, 2, 4 or a prime > 3. - _Chai Wah Wu_, Jun 22 2020

%e There are 4 normal integer partitions of 10 whose sequence of multiplicities is a palindrome, namely (4321), (33211), (32221), (1111111111), so 10 does not belong to the sequence. The normal integer partitions of 7 are (3211), (2221), (22111), (211111), (1111111), none of which has palindromic multiplicities except the last, so 7 belongs to the sequence.

%t Select[Range[0,30],Length[Select[IntegerPartitions[#],And[Or[#=={},Union[#]==Range[First[#]]],Length/@Split[#]==Reverse[Length/@Split[#]]]&]]==1&]

%o (Python)

%o # from definition

%o from sympy.utilities.iterables import partitions

%o from sympy import integer_nthroot

%o A335402_list = []

%o for m in range(0,101):

%o for d in partitions(m,k=integer_nthroot(2*m,2)[0]):

%o l = len(d)

%o if l > 0 and not(l == 1 and 1 in d):

%o k = max(d)

%o if l == k:

%o for i in range(k//2):

%o if d[i+1] != d[k-i]:

%o break

%o else:

%o break

%o else:

%o A335402_list.append(m) # _Chai Wah Wu_, Jun 22 2020

%o (Python)

%o # from formula

%o from sympy import prime

%o A335402_list = [0,1,2,4] + [prime(i) for i in range(3,100)] # _Chai Wah Wu_, Jun 22 2020

%Y Positions of 1's in A317086.

%Y Palindromic-multiplicity partitions are counted by A317085.

%Y Normal integer partitions are counted by A000009.

%Y Heinz numbers of normal palindromic-multiplicity partitions are A317087.

%Y Cf. A000041, A000837, A025065, A046022, A124010, A242414.

%K nonn,easy

%O 1,3

%A _Gus Wiseman_, Jun 06 2020

%E a(22)-a(59) from _Chai Wah Wu_, Jun 22 2020