\( \newcommand{\br}[1]{\left( #1\right)} \newcommand{\logpar}[1]{\log\left( #1\right)} \newcommand{\cospar}[1]{\cos\left( #1\right)} \newcommand{\sinpar}[1]{\sin\left( #1\right)} \newcommand{\tanpar}[1]{\tan\left( #1\right)} \newcommand{\arcsinpar}[1]{\sin^{-1}\!\left( #1\right)} \newcommand{\arccospar}[1]{\cos^{-1}\!\left( #1\right)} \newcommand{\arctanpar}[1]{\tan^{-1}\!\left( #1\right)} \newcommand{\asin}[1]{\sin^{-1}\! #1} \newcommand{\acos}[1]{\cos^{-1}\! #1} \newcommand{\atan}[1]{\tan^{-1}\! #1} \newcommand{\asinh}[1]{\sinh^{-1}\! #1} \newcommand{\acosh}[1]{\cosh^{-1}\! #1} \newcommand{\atanh}[1]{\tanh^{-1}\! #1} \newcommand{\logten}[1]{\log_{10}\! #1} \definecolor{explaination}{RGB}{0, 166, 226} \newcommand{\ubrace}[2][u]{ { \color{explaination}{\underbrace{ {\color{black}{#2}} }_{#1}} } } \newcommand{\obrace}[2][u]{ { \color{explaination}{\overbrace{ {\color{black}{#2}} }^{#1}} } } \definecolor{highlight}{RGB}{181, 41, 118} \newcommand{\xplain}[1]{{ \textcolor{explaination} { \footnotesize{ #1 \newline}}}} \newcommand{\hilite}[1]{{ \textcolor{highlight} { { #1 }}}} \definecolor{lightergray}{gray}{.675} \newcommand{\hide}[1]{{ \textcolor{lightergray} { \footnotesize{ #1 \newline}}}} \newcommand{\mth}[1]{ { \textcolor{black} { { \small #1 } } } } \)

Übung: Primfaktorzerlegung

0 0
getPrime()

Was ist die Primfaktorzerlegung von NUMBER?

NUMBER

Wir zeichnen die Primfaktorzerlegung als Baumdiagramm.

init({ range: [ [-1, 2], [-1, 1] ], scale: [30, 30] }); label( [cx, y], NUMBER );
circle( [cx, y], 0.5 );

Da NUMBER eine Primzahl ist, ist die Primfaktorzerlegung einfach nur NUMBER.

getComposite() getPrimeFactorization( NUMBER ) SOLUTION.slice( 0, SOLUTION.length - 1 ) NUMBER

Was ist die Primfaktorzerlegung von NUMBER?

SOLUTION.join("x")

Wir zeichnen die Primfaktorzerlegung als Baumdiagramm.

init({ range: [ [-1, FACTORIZATION.length + 2], [ -2 * FACTORIZATION.length - 1, 1] ], scale: [30, 30] }); label( [cx + 1, y], curr );
path( [ [cx + 1, y - 0.5], [cx, y - 1.5] ] ); path( [ [cx + 1, y - 0.5], [cx + 2, y - 1.5] ] ); y -= 2; cx += 1; curr = curr / factor; label( [cx - 1, y], factor ); circle( [cx - 1, y], 0.5); label( [cx + 1, y], curr );
circle( [cx + 1, y], 0.5);

Die Primfaktorzerlegung von NUMBER ist SOLUTION.join(" × ").