A334246 A triple of positive integers (n,p,k) is admissible if there exist at least two different multisets of k positive integers, {x_1,x_2,...,x_k} and {y_1,y_2,...,y_k}, such that x_1+x_2+...+x_k = y_1+y_2+...+y_k = n and x_1x_2...x_k = y_1y_2...y_k = p. For each n, let A(n) = {(p,k):(n,p,k) is admissible for some k}; then a(n) = |A(n)|.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 7, 13, 20, 29, 44, 66, 90, 129, 174, 232, 306, 406, 520, 675, 851, 1068, 1329, 1640, 2001, 2460, 2989, 3615, 4342, 5202, 6204, 7381, 8697, 10256, 12042, 14069, 16435, 19090, 22141, 25607, 29534
Offset: 1
Keywords
Examples
For n=12: {(4, 48)}. For n=13: {(3, 36), (5, 48)}. For n=14: {(4, 36), (3, 40), (3, 72), (5, 96), (6, 48)}. For n=15: {(5, 36), (5, 144), (4, 72), (4, 40), (6, 96), (7, 48), (4, 96)}.
Links
- Jay Bennett, Riddle of the week #34: Two wizards ride a bus, Popular Mechanics. Hearst Communications, Inc., 4 Aug. 2017. 12 Jun. 2018 Accessed.
- John B. Kelly, Partitions with equal products, Proc. Amer. Math. Soc. 15 (1964), 987-990.
- Tanya Khovanova, Conway's Wizards, arXiv:1210.5460 [math.HO], 2012.
Crossrefs
Programs
-
Python
from collections import Counter from functools import reduce def partitions(n, I=1): yield (n,) for i in range(I, n//2 + 1): for p in partitions(n-i, i): yield (i,) + p def p(i): #ret partitions of i, sorted by part number and product of parts return sorted( [ ( len(p), reduce( (lambda x, y: x * y), p) ) for p in partitions(i) ] ) def a(p_list): #returns number of pairs appearing more than once return len([x for x,y in Counter(p_list).most_common() if y > 1]) print(a(p(i))) # Will print the value of a(i)
Comments