Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
16
Task/Ruth-Aaron-numbers/Mathematica/ruth-aaron-numbers.math
Normal file
16
Task/Ruth-Aaron-numbers/Mathematica/ruth-aaron-numbers.math
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
SumPrimeDivisors[n_] := Total[First /@ FactorInteger[n]]
|
||||
RuthAaron[n_] := SumPrimeDivisors[n] == SumPrimeDivisors[n + 1]
|
||||
|
||||
SumPrimeFactors[n_] :=
|
||||
Total[First[#] * Last[#] & /@ FactorInteger[n]]
|
||||
RuthAaronFactors[n_] :=
|
||||
SumPrimeFactors[n] == SumPrimeFactors[n + 1]
|
||||
|
||||
RuthAaronSeq := Select[Range[100000], RuthAaron]
|
||||
RuthAaronFactorSeq := Select[Range[100000], RuthAaronFactors]
|
||||
|
||||
Print["30 Ruth Aaron numbers:"]
|
||||
Print[Take[RuthAaronSeq, 30]]
|
||||
|
||||
Print["\n30 Ruth Aaron factor numbers:"]
|
||||
Print[Take[RuthAaronFactorSeq, 30]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue