This site is supported by donations to The OEIS Foundation.
Template:Quadratfrei
The {{quadratfrei}} arithmetic function template returns the characteristic function of squarefree numbers of (quadratfrei function of , ) of a nonzero integer, otherwise returns an error message.
Usage
- {{quadratfrei|a nonzero integer}}
Valid input
A nonzero integer less than 1031 2 = 1062961 (validation is done by the {{mpf}} arithmetic function template).
Examples
Examples with valid input (check with https://oeis.org/A008966/b008966.txt Table of n, rad(n) for n = 1..100000)
Unfortunately, with the transclusion of {{quadratfrei/doc}} via the {{documentation}} template the precious limited nesting levels of templates and/or parser functions were exhausted! :-( Check {{quadratfrei/doc}} directly to see that all the tests are successful. Fortunately, by transcluding {{quadratfrei/doc}} directly, borrowing the minimum code needed here from the {{documentation}} template, we manage to not exhaust the limit! :-)
Code Result {{quadratfrei|210^2}} 0 {{quadratfrei|-28}} 0 {{quadratfrei|-5}} 1 {{quadratfrei|1}} 1 {{quadratfrei|7}} 1 {{quadratfrei|15}} 1 {{quadratfrei|27}} 0 {{quadratfrei|30}} 1 {{quadratfrei|111}} 1 {{quadratfrei|5^3 * 11^2}} 0 {{quadratfrei|2^5 * 3^3 * 5}} 0 {{quadratfrei|2^9 * 3^3}} 0 {{quadratfrei|37^2 + 8 * 37^2}} 0 {{quadratfrei|2^9 * (26 + 1)}} 0 {{quadratfrei|89 * 113}} 1 {{quadratfrei|79 * 79}} 0 {{quadratfrei|210^2}} 0 {{quadratfrei|233^2}} 0 {{quadratfrei|10000}} 0 {{quadratfrei|65535}} 1 {{quadratfrei|65536}} 0 {{quadratfrei|65537}} 1 {{quadratfrei|65539}} 1 {{quadratfrei|65540}} 0 {{quadratfrei|65541}} 1 {{quadratfrei|65542}} 1 {{quadratfrei|65543}} 1 {{quadratfrei|65547}} 0 {{quadratfrei|65549}} 1 {{quadratfrei|65551}} 1 {{quadratfrei|65553}} 1 {{quadratfrei|65557}} 1 {{quadratfrei|65559}} 0 {{quadratfrei|65561}} 1 {{quadratfrei|65563}} 1 {{quadratfrei|65567}} 1 {{quadratfrei|65569}} 1 {{quadratfrei|65571}} 1 {{quadratfrei|65573}} 1 {{quadratfrei|65577}} 1 {{quadratfrei|65579}} 1 {{quadratfrei|265535}} 1 {{quadratfrei|265536}} 0 {{quadratfrei|265537}} 1 {{quadratfrei|265539}} 1 {{quadratfrei|265540}} 0 {{quadratfrei|265541}} 1 {{quadratfrei|265542}} 1 {{quadratfrei|265543}} 1 {{quadratfrei|265547}} 1 {{quadratfrei|265549}} 1 {{quadratfrei|265551}} 1 {{quadratfrei|265553}} 1 {{quadratfrei|265557}} 1 {{quadratfrei|265559}} 1 {{quadratfrei|265561}} 1 {{quadratfrei|265563}} 0 {{quadratfrei|265567}} 1 {{quadratfrei|265569}} 1 {{quadratfrei|265571}} 1 {{quadratfrei|265573}} 1 {{quadratfrei|265577}} 1 {{quadratfrei|265579}} 1 {{quadratfrei|257}} 1 {{quadratfrei|97 * 211}} 1 {{quadratfrei|216 * 211}} 0 {{quadratfrei|1024 * 45}} 0 {{quadratfrei|97 * 257}} 1 {{quadratfrei|3^6 * 5^2}} 0 {{quadratfrei|3 * 5^5}} 0 {{quadratfrei|17^2 * 191}} 0 {{quadratfrei|5 * 7 * 13 * 29}} 1 {{quadratfrei|509^2}} 0 {{quadratfrei|965535}} 1 {{quadratfrei|965536}} 0 {{quadratfrei|965537}} 1 {{quadratfrei|965539}} 1 {{quadratfrei|965540}} 0 {{quadratfrei|965541}} 1 {{quadratfrei|965542}} 1 {{quadratfrei|965543}} 1 {{quadratfrei|965547}} 0 {{quadratfrei|965549}} 0 {{quadratfrei|965551}} 1 {{quadratfrei|965553}} 1 {{quadratfrei|965557}} 1 {{quadratfrei|965559}} 1 {{quadratfrei|965561}} 1 {{quadratfrei|965563}} 1 {{quadratfrei|965567}} 1 {{quadratfrei|965569}} 1 {{quadratfrei|965571}} 1 {{quadratfrei|965573}} 1 {{quadratfrei|965577}} 1 {{quadratfrei|965579}} 1 {{quadratfrei|1015941}} 1 {{quadratfrei|997 * 1019}} 1 {{quadratfrei|1015943}} 1 {{quadratfrei|1015945}} 1 {{quadratfrei|1015947}} 0 {{quadratfrei|1015949}} 1 {{quadratfrei|1015950}} 0
Examples with invalid input (argument validation by {{quadratfrei}} is omitted to spare some precious limited nesting levels of templates and/or parser functions).
Code Result {{quadratfrei|0}} Expression error: Unrecognized word "strong". {{quadratfrei|1031^2}} Expression error: Unrecognized word "strong".
Code
<noinclude><!-- {{documentation}} --><!-- We can't use it here, the precious limited nesting levels of templates and/or parser functions get exhausted! So we just borrow the necessary code from it instead. --><div style="text-align: center; font-size: smaller;">The following [[Help:Documenting templates|documentation]] is located at [[Template:{{PAGENAME}}/doc]].</div>{{Template:{{PAGENAME}}/doc}}<!-- --></noinclude><includeonly>{{#expr: not ( ( abs ({{{1|1}}}) ) - ( 0{{mpf| {{{1|1}}} |sep = * |key/val_sep = * 1^}} + {{#ifexpr: abs ({{{1|1}}}) = 1 | 1 | 0 }} ) ) }}</includeonly>
See also
- {{distinct prime factors up to sqrt(n)}} or {{dpf le sqrt(n)}}
- {{distinct nontrivial prime factors}} or {{dpf lt n}}
- {{distinct prime factors}} or {{dpf}}
- {{number of distinct prime factors}} or {{little omega}}
- {{sum of distinct prime factors}} or {{sodpf}}
- {{product of distinct prime factors}} or {{squarefree kernel}} or {{radical}} or {{rad}}
- {{multiplicity}}
- {{prime factors (with multiplicity) up to sqrt(n)}} or {{mpf le sqrt(n)}}
- {{nontrivial prime factors (with multiplicity)}} or {{mpf lt n}}
- {{prime factors (with multiplicity)}} or {{mpf}} or {{factorization}}
- {{number of prime factors (with multiplicity)}} or {{big Omega}}
- {{sum of prime factors (with multiplicity)}} or {{sopfr}} or {{integer log}}
- {{product of prime factors (with multiplicity)}} (must give back {{abs|n}}, the absolute value of
)n
- {{quadratfrei}}
- {{Moebius mu}} or {{mu}}
- {{Euler phi}} or {{totient}}
- {{Dedekind psi}}
- {{number of divisors}} or {{sigma 0}} or {{tau}}
- {{sum of divisors}} or {{sigma 1}} or {{sigma}} (Cf. {{divisor function}} or {{sigma k}}, with
(default value))k = 1 - {{divisor function}} or {{sigma k}} (for
)k ≠ 0
External links
- Andrew Hodges, Java Applet for Factorization
- http://factordb.com/