OFFSET
1,3
COMMENTS
An integer partition is normal if it covers an initial interval of positive integers.
Conjecture: The sequence consists of 0, 1, 4, and all primes except 3.
From Chai Wah Wu, Jun 22 2020: (Start)
The above conjecture is true.
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.
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.
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.
Next we show that if n is composite and not equal to 4, then n is not a term.
Suppose n = pq for 1 < p <= q. If p is odd, let k = p-1 > 1.
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.
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
It is clear that if n is not a term, then any multiple of n is also not a term.
(End)
FORMULA
n is a term if and only if n = 0, 1, 2, 4 or a prime > 3. - Chai Wah Wu, Jun 22 2020
EXAMPLE
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.
MATHEMATICA
Select[Range[0, 30], Length[Select[IntegerPartitions[#], And[Or[#=={}, Union[#]==Range[First[#]]], Length/@Split[#]==Reverse[Length/@Split[#]]]&]]==1&]
PROG
(Python)
# from definition
from sympy.utilities.iterables import partitions
from sympy import integer_nthroot
A335402_list = []
for m in range(0, 101):
for d in partitions(m, k=integer_nthroot(2*m, 2)[0]):
l = len(d)
if l > 0 and not(l == 1 and 1 in d):
k = max(d)
if l == k:
for i in range(k//2):
if d[i+1] != d[k-i]:
break
else:
break
else:
A335402_list.append(m) # Chai Wah Wu, Jun 22 2020
(Python)
# from formula
from sympy import prime
A335402_list = [0, 1, 2, 4] + [prime(i) for i in range(3, 100)] # Chai Wah Wu, Jun 22 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gus Wiseman, Jun 06 2020
EXTENSIONS
a(22)-a(59) from Chai Wah Wu, Jun 22 2020
STATUS
approved