[math-fun] q-numbers are actually fun.
(Kids: I highly recommend grokking this. Ask me anything.) Years ago I wrote WRI a package of q-utilities, e.g. QPochhammer, QFactorial, QBinomial, ... . One of the items in the spec was QNumber, which is just, e.g., In[120]:= qNumber[4, -q^2] Out[120]= 1 - q^2 + q^4 - q^6 I.e., replace the number n by n terms of the geometric series with the specified term ratio. It seemed sort of useless and trivial. I was a bit relieved when they didn't install it. I was wrong. Let's play. Exercise: Expand In[121]:= qNumber[5, q] qNumber[5, -q] Out[121]= (1 - q + q^2 - q^3 + q^4) (1 + q + q^2 + q^3 + q^4) in your head! SPOILER: StringReverse@"]2^q,5[rebmuNq" Why? Nice Mathematica exercise: Inverse qNumber. E.g., In[125]:= unqNumber /@ %121 Out[125]= Inactive[qNumber][5, -q] Inactive[qNumber][5, q] Try it! Here's a way, if you give up: unqNumber[p_] := Module[{L = List @@ Together@p}, Inactive[qNumber][Length@L, L[[2]]] /; PolynomialQ[p, Variables[p][[1]]]&&SameQ @@ (Drop[L, 1]/Drop[L, -1])] If you study the following factorizations, you should formulate enough theorems to mentally factorize any q-number whose q➝1 you can mentally factorize. True or False: the factors are always q-numbers. 0 0 1 1 2 1+q 3 1+q+q^2 2^2 (1+q) (1+q^2) 5 1+q+q^2+q^3+q^4 2 3 (1+q) (1-q+q^2) (1+q+q^2) 7 1+q+q^2+q^3+q^4+q^5+q^6 2^3 (1+q) (1+q^2) (1+q^4) 3^2 (1+q+q^2) (1+q^3+q^6) 2 5 (1+q) (1-q+q^2-q^3+q^4) (1+q+q^2+q^3+q^4) 11 1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10 2^2 3 (1+q) (1+q^2) (1-q+q^2) (1+q+q^2) (1-q^2+q^4) 13 1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12 2 7 (1+q) (1-q+q^2-q^3+q^4-q^5+q^6) (1+q+q^2+q^3+q^4+q^5+q^6) 3 5 (1+q+q^2) (1+q+q^2+q^3+q^4) (1-q+q^3-q^4+q^5-q^7+q^8) 2^4 (1+q) (1+q^2) (1+q^4) (1+q^8) 17 1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12+q^13+q^14+q^15+q^16 2 3^2 (1+q) (1-q+q^2) (1+q+q^2) (1-q^3+q^6) (1+q^3+q^6) 19 1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12+q^13+q^14+q^15+q^16+q^17+q^18 2^2 5 (1+q) (1+q^2) (1-q+q^2-q^3+q^4) (1+q+q^2+q^3+q^4) (1-q^2+q^4-q^6+q^8) 3 7 (1+q+q^2) (1+q+q^2+q^3+q^4+q^5+q^6) (1-q+q^3-q^4+q^6-q^8+q^9-q^11+q^12) 2 11 (1+q) (1-q+q^2-q^3+q^4-q^5+q^6-q^7+q^8-q^9+q^10) (1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10) 23 1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12+q^13+q^14+q^15+q^16+q^17+q^18+q^19+q^20+q^21+q^22 2^3 3 (1+q) (1+q^2) (1-q+q^2) (1+q+q^2) (1+q^4) (1-q^2+q^4) (1-q^4+q^8) 5^2 (1+q+q^2+q^3+q^4) (1+q^5+q^10+q^15+q^20) 2 13 (1+q) (1-q+q^2-q^3+q^4-q^5+q^6-q^7+q^8-q^9+q^10-q^11+q^12) (1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12) 3^3 (1+q+q^2) (1+q^3+q^6) (1+q^9+q^18) —rwg
Bill, that's what I call "QUte" (grin) Wouter -----Original Message----- From: Bill Gosper Sent: Monday, October 28, 2019 9:02 PM To: math-fun@mailman.xmission.com Cc: Wolfram Technical Support Subject: [math-fun] q-numbers are actually fun. (Kids: I highly recommend grokking this. Ask me anything.) Years ago I wrote WRI a package of q-utilities, e.g. QPochhammer, QFactorial, QBinomial, ... . One of the items in the spec was QNumber, which is just, e.g., In[120]:= qNumber[4, -q^2] Out[120]= 1 - q^2 + q^4 - q^6 I.e., replace the number n by n terms of the geometric series with the specified term ratio. It seemed sort of useless and trivial. I was a bit relieved when they didn't install it. I was wrong. Let's play. Exercise: Expand In[121]:= qNumber[5, q] qNumber[5, -q] Out[121]= (1 - q + q^2 - q^3 + q^4) (1 + q + q^2 + q^3 + q^4) in your head! SPOILER: StringReverse@"]2^q,5[rebmuNq" Why? Nice Mathematica exercise: Inverse qNumber. E.g., In[125]:= unqNumber /@ %121 Out[125]= Inactive[qNumber][5, -q] Inactive[qNumber][5, q] Try it! Here's a way, if you give up: unqNumber[p_] := Module[{L = List @@ Together@p}, Inactive[qNumber][Length@L, L[[2]]] /; PolynomialQ[p, Variables[p][[1]]]&&SameQ @@ (Drop[L, 1]/Drop[L, -1])] If you study the following factorizations, you should formulate enough theorems to mentally factorize any q-number whose q➝1 you can mentally factorize. True or False: the factors are always q-numbers. 0 0 1 1 2 1+q 3 1+q+q^2 2^2 (1+q) (1+q^2) 5 1+q+q^2+q^3+q^4 2 3 (1+q) (1-q+q^2) (1+q+q^2) 7 1+q+q^2+q^3+q^4+q^5+q^6 2^3 (1+q) (1+q^2) (1+q^4) 3^2 (1+q+q^2) (1+q^3+q^6) 2 5 (1+q) (1-q+q^2-q^3+q^4) (1+q+q^2+q^3+q^4) 11 1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10 2^2 3 (1+q) (1+q^2) (1-q+q^2) (1+q+q^2) (1-q^2+q^4) 13 1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12 2 7 (1+q) (1-q+q^2-q^3+q^4-q^5+q^6) (1+q+q^2+q^3+q^4+q^5+q^6) 3 5 (1+q+q^2) (1+q+q^2+q^3+q^4) (1-q+q^3-q^4+q^5-q^7+q^8) 2^4 (1+q) (1+q^2) (1+q^4) (1+q^8) 17 1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12+q^13+q^14+q^15+q^16 2 3^2 (1+q) (1-q+q^2) (1+q+q^2) (1-q^3+q^6) (1+q^3+q^6) 19 1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12+q^13+q^14+q^15+q^16+q^17+q^18 2^2 5 (1+q) (1+q^2) (1-q+q^2-q^3+q^4) (1+q+q^2+q^3+q^4) (1-q^2+q^4-q^6+q^8) 3 7 (1+q+q^2) (1+q+q^2+q^3+q^4+q^5+q^6) (1-q+q^3-q^4+q^6-q^8+q^9-q^11+q^12) 2 11 (1+q) (1-q+q^2-q^3+q^4-q^5+q^6-q^7+q^8-q^9+q^10) (1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10) 23 1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12+q^13+q^14+q^15+q^16+q^17+q^18+q^19+q^20+q^21+q^22 2^3 3 (1+q) (1+q^2) (1-q+q^2) (1+q+q^2) (1+q^4) (1-q^2+q^4) (1-q^4+q^8) 5^2 (1+q+q^2+q^3+q^4) (1+q^5+q^10+q^15+q^20) 2 13 (1+q) (1-q+q^2-q^3+q^4-q^5+q^6-q^7+q^8-q^9+q^10-q^11+q^12) (1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12) 3^3 (1+q+q^2) (1+q^3+q^6) (1+q^9+q^18) —rwg _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
On Mon, Oct 28, 2019 at 1:02 PM Bill Gosper <billgosper@gmail.com> wrote:
(Kids: I highly recommend grokking this. Ask me anything.)
Except the factorization of qNumber[35,q].
Years ago I wrote WRI a package of q-utilities, e.g. QPochhammer, QFactorial, QBinomial, ... . One of the items in the spec was QNumber, which is just, e.g., In[120]:= qNumber[4, -q^2]
Out[120]= 1 - q^2 + q^4 - q^6 I.e., replace the number n by n terms of the geometric series with the specified term ratio.
It seemed sort of useless and trivial. I was a bit relieved when they didn't install it. I was wrong. Let's play.
Exercise: Expand In[121]:= qNumber[5, q] qNumber[5, -q] Out[121]= (1 - q + q^2 - q^3 + q^4) (1 + q + q^2 + q^3 + q^4)
in your head! SPOILER: StringReverse@"]2^q,5[rebmuNq" Why?
Nice Mathematica exercise: Inverse qNumber. E.g., In[125]:= unqNumber /@ %121
Out[125]= Inactive[qNumber][5, -q] Inactive[qNumber][5, q]
Try it! Here's a way, if you give up: unqNumber[p_] := Module[{L = List @@ Together@p}, Inactive[qNumber][Length@L, L[[2]]] /; PolynomialQ[p, Variables[p][[1]]]&&SameQ @@ (Drop[L, 1]/Drop[L, -1])]
If you study the following factorizations,
and you are smarter than me,
you should formulate enough theorems to mentally factorize any q-number whose q➝1 you can mentally factorize.
Wrong, sorry. Unless you can compute cyclotomic polynomials in your head. https://en.wikipedia.org/wiki/Cyclotomic_polynomial True or False: the factors are always q-numbers.
False. E.g., In[131]:= Cyclotomic[#, q] & /@ {15, 21, 33, 35, 105} Out[131]= {1 - q + q^3 - q^4 + q^5 - q^7 + q^8, 1 - q + q^3 - q^4 + q^6 - q^8 + q^9 - q^11 + q^12, 1 - q + q^3 - q^4 + q^6 - q^7 + q^9 - q^10 + q^11 - q^13 + q^14 - q^16 + q^17 - q^19 + q^20, 1 - q + q^5 - q^6 + q^7 - q^8 + q^10 - q^11 + q^12 - q^13 + q^14 - q^16 + q^17 - q^18 + q^19 - q^23 + q^24, 1 + q + q^2 - q^5 - q^6 - 2 q^7 - q^8 - q^9 + q^12 + q^13 + q^14 + q^15 + q^16 + q^17 - q^20 - q^22 - q^24 - q^26 - q^28 + q^31 + q^32 + q^33 + q^34 + q^35 + q^36 - q^39 - q^40 - *2 q^41* - q^42 - q^43 + q^46 + q^47 + q^48} Can you guess the first one with a coefficient of *3*? 0 0
1 1 2 1+q 3 1+q+q^2 2^2 (1+q) (1+q^2) 5 1+q+q^2+q^3+q^4 2 3 (1+q) (1-q+q^2) (1+q+q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10+q^15+q^20) 2 13 (1+q) (1-q+q^2-q^3+q^4-q^5+q^6-q^7+q^8-q^9+q^10-q^11+q^12) (1+q+q^2+q^3+q^4+q^5+q^6+q^7+q^8+q^9+q^10+q^11+q^12) 3^3 (1+q+q^2) (1+q^3+q^6) (1+q^9+q^18) —rwg
participants (2)
-
Bill Gosper -
Wouter Meeussen