Talk:Deceptive numbers: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
No edit summary
Line 1: Line 1:
Since the repunit ends in 1 5 can not be a factor of n--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 11:44, 12 February 2022 (UTC)
Since the repunit ends in 1 5 can not be a factor of n--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 11:44, 12 February 2022 (UTC)


Since the repunit is odd, 2 cannot be a factor of n. And because the digit sum of the repunit is n - 1, 3 cannot be factor of n. --[[User:Querfeld|Querfeld]] ([[User talk:Querfeld|talk]]) 10:01, 17 September 2023 (UTC)
Since the repunit is odd, 2 cannot be a factor of n. And because the digit sum of the repunit is <var>n - 1</var>, 3 cannot be a factor of <var>n</var> (an integer is divisible by 3, if its digit sum is divisible by 3, but <var>n - 1</var> and <var>n</var> cannot both be divisible by 3).<br>
All non-primes below 7<sup>2</sup> are divisible by 2, 3, or 5. So it is sufficient to start the search at 49. --[[User:Querfeld|Querfeld]] ([[User talk:Querfeld|talk]]) 14:01, 24 September 2023 (UTC)

Revision as of 14:02, 24 September 2023

Since the repunit ends in 1 5 can not be a factor of n--Nigel Galloway (talk) 11:44, 12 February 2022 (UTC)

Since the repunit is odd, 2 cannot be a factor of n. And because the digit sum of the repunit is n - 1, 3 cannot be a factor of n (an integer is divisible by 3, if its digit sum is divisible by 3, but n - 1 and n cannot both be divisible by 3).
All non-primes below 72 are divisible by 2, 3, or 5. So it is sufficient to start the search at 49. --Querfeld (talk) 14:01, 24 September 2023 (UTC)