login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,13

COMMENTS

J. H. Conway proposed an interesting math puzzle in the 1960s, which is now generally known as "Conway's wizard problem." Here is the problem.

Last night I sat behind two wizards on a bus and overheard the following:

Blue Wizard: I have a positive integer number of children, whose ages are positive integers. The sum of their ages is the number of this bus, while the product is my own age.

Red Wizard: How interesting! Perhaps if you told me your age and the number of your children, I could work out their individual ages?

Blue Wizard: No, you could not.

Red Wizard: Aha! At last, I know how old you are!

Apparently the Red Wizard had been trying to determine the Blue Wizard's age for some time. Now, what was the number of the bus?

This problem posed by Conway looks at different multisets that correspond to the same ordered triple, which motivated the study of this sequence.

The number n for which a(n)=1 gives the solution to Conway's puzzle.

LINKS

Table of n, a(n) for n=1..49.

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.

EXAMPLE

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)}.

PROG

(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)

CROSSREFS

If only counting unique k: A316945; if only counting unique p: A316946.

See A140437 for another sequence related to the wizards problem.

Sequence in context: A056985 A082182 A032719 * A275287 A261581 A045355

Adjacent sequences:  A334243 A334244 A334245 * A334247 A334248 A334249

KEYWORD

nonn

AUTHOR

Bryan Bischof, Apr 20 2020

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 6 10:14 EDT 2020. Contains 336245 sequences. (Running on oeis4.)