Talk:Luhn algorithm: Difference between revisions

Content deleted Content added
Line 83:
 
I've moved these links to a section on the main page, complying with the compromise. --ZX2C4
 
== Mathematica implementation ==
 
Still missing this one :)
 
LuhnCheck[n_] := Module[{digits = IntegerDigits[n]},
For[i = Length[digits] - 1, i >= 1, i -= 2, digits[[i]] = FixedPoint[Composition[Total, IntegerDigits], 2*digits[[i]]]];
Mod[Total[digits], 10] == 0
]
11:42, 28 December 2007 (UTC)