Using a Do-loop to find divisors mod 13 [closed]
$begingroup$
I want to check sum of divisors of i
mod 13 fori = 1
to i = 2
0. I tried writing a Do-Print loop so it looks like
Do[Print[DivisorSigma[1, i], {i, 20} mod 13]
Any help will be greatly appreciated,
core-language number-theory
$endgroup$
closed as off-topic by Daniel Lichtblau, m_goldberg, MarcoB, eyorble, march Feb 20 at 18:53
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, m_goldberg, MarcoB, eyorble, march
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
$begingroup$
I want to check sum of divisors of i
mod 13 fori = 1
to i = 2
0. I tried writing a Do-Print loop so it looks like
Do[Print[DivisorSigma[1, i], {i, 20} mod 13]
Any help will be greatly appreciated,
core-language number-theory
$endgroup$
closed as off-topic by Daniel Lichtblau, m_goldberg, MarcoB, eyorble, march Feb 20 at 18:53
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, m_goldberg, MarcoB, eyorble, march
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
$begingroup$
I want to check sum of divisors of i
mod 13 fori = 1
to i = 2
0. I tried writing a Do-Print loop so it looks like
Do[Print[DivisorSigma[1, i], {i, 20} mod 13]
Any help will be greatly appreciated,
core-language number-theory
$endgroup$
I want to check sum of divisors of i
mod 13 fori = 1
to i = 2
0. I tried writing a Do-Print loop so it looks like
Do[Print[DivisorSigma[1, i], {i, 20} mod 13]
Any help will be greatly appreciated,
core-language number-theory
core-language number-theory
edited Feb 19 at 23:28
m_goldberg
87.7k872198
87.7k872198
asked Feb 19 at 22:16
argamonargamon
294
294
closed as off-topic by Daniel Lichtblau, m_goldberg, MarcoB, eyorble, march Feb 20 at 18:53
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, m_goldberg, MarcoB, eyorble, march
If this question can be reworded to fit the rules in the help center, please edit the question.
closed as off-topic by Daniel Lichtblau, m_goldberg, MarcoB, eyorble, march Feb 20 at 18:53
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, m_goldberg, MarcoB, eyorble, march
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Table[DivisorSigma[1, i], {i, 20} ] // Mod[#, 13] &
(*{1, 3, 4, 7, 6, 12, 8, 2, 0, 5, 12, 2, 1, 11, 11, 5, 5, 0, 7, 3}*)
or
Do[Print[Mod[DivisorSigma[1, i], 13]], {i, 20}]
which gives a column of the same numbers as before that you can look at, but it is more difficult use in further expressions.
$endgroup$
$begingroup$
thank you so much
$endgroup$
– argamon
Feb 19 at 22:28
$begingroup$
You're welcome.
$endgroup$
– Bill Watts
Feb 19 at 22:29
add a comment |
$begingroup$
You can do it without iterators because the functions you need (Mod
, DivisorSigma
) are Listable
:
Mod[DivisorSigma[1, Range[20]], 13]
{1, 3, 4, 7, 6, 12, 8, 2, 0, 5, 12, 2, 1, 11, 11, 5, 5, 0, 7, 3}
Note: Listable
functions are applied separately to each element in a list.
$endgroup$
$begingroup$
that's also very useful and helpful thank you
$endgroup$
– argamon
Feb 19 at 22:56
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Table[DivisorSigma[1, i], {i, 20} ] // Mod[#, 13] &
(*{1, 3, 4, 7, 6, 12, 8, 2, 0, 5, 12, 2, 1, 11, 11, 5, 5, 0, 7, 3}*)
or
Do[Print[Mod[DivisorSigma[1, i], 13]], {i, 20}]
which gives a column of the same numbers as before that you can look at, but it is more difficult use in further expressions.
$endgroup$
$begingroup$
thank you so much
$endgroup$
– argamon
Feb 19 at 22:28
$begingroup$
You're welcome.
$endgroup$
– Bill Watts
Feb 19 at 22:29
add a comment |
$begingroup$
Table[DivisorSigma[1, i], {i, 20} ] // Mod[#, 13] &
(*{1, 3, 4, 7, 6, 12, 8, 2, 0, 5, 12, 2, 1, 11, 11, 5, 5, 0, 7, 3}*)
or
Do[Print[Mod[DivisorSigma[1, i], 13]], {i, 20}]
which gives a column of the same numbers as before that you can look at, but it is more difficult use in further expressions.
$endgroup$
$begingroup$
thank you so much
$endgroup$
– argamon
Feb 19 at 22:28
$begingroup$
You're welcome.
$endgroup$
– Bill Watts
Feb 19 at 22:29
add a comment |
$begingroup$
Table[DivisorSigma[1, i], {i, 20} ] // Mod[#, 13] &
(*{1, 3, 4, 7, 6, 12, 8, 2, 0, 5, 12, 2, 1, 11, 11, 5, 5, 0, 7, 3}*)
or
Do[Print[Mod[DivisorSigma[1, i], 13]], {i, 20}]
which gives a column of the same numbers as before that you can look at, but it is more difficult use in further expressions.
$endgroup$
Table[DivisorSigma[1, i], {i, 20} ] // Mod[#, 13] &
(*{1, 3, 4, 7, 6, 12, 8, 2, 0, 5, 12, 2, 1, 11, 11, 5, 5, 0, 7, 3}*)
or
Do[Print[Mod[DivisorSigma[1, i], 13]], {i, 20}]
which gives a column of the same numbers as before that you can look at, but it is more difficult use in further expressions.
edited Feb 19 at 22:33
answered Feb 19 at 22:27
Bill WattsBill Watts
3,6111621
3,6111621
$begingroup$
thank you so much
$endgroup$
– argamon
Feb 19 at 22:28
$begingroup$
You're welcome.
$endgroup$
– Bill Watts
Feb 19 at 22:29
add a comment |
$begingroup$
thank you so much
$endgroup$
– argamon
Feb 19 at 22:28
$begingroup$
You're welcome.
$endgroup$
– Bill Watts
Feb 19 at 22:29
$begingroup$
thank you so much
$endgroup$
– argamon
Feb 19 at 22:28
$begingroup$
thank you so much
$endgroup$
– argamon
Feb 19 at 22:28
$begingroup$
You're welcome.
$endgroup$
– Bill Watts
Feb 19 at 22:29
$begingroup$
You're welcome.
$endgroup$
– Bill Watts
Feb 19 at 22:29
add a comment |
$begingroup$
You can do it without iterators because the functions you need (Mod
, DivisorSigma
) are Listable
:
Mod[DivisorSigma[1, Range[20]], 13]
{1, 3, 4, 7, 6, 12, 8, 2, 0, 5, 12, 2, 1, 11, 11, 5, 5, 0, 7, 3}
Note: Listable
functions are applied separately to each element in a list.
$endgroup$
$begingroup$
that's also very useful and helpful thank you
$endgroup$
– argamon
Feb 19 at 22:56
add a comment |
$begingroup$
You can do it without iterators because the functions you need (Mod
, DivisorSigma
) are Listable
:
Mod[DivisorSigma[1, Range[20]], 13]
{1, 3, 4, 7, 6, 12, 8, 2, 0, 5, 12, 2, 1, 11, 11, 5, 5, 0, 7, 3}
Note: Listable
functions are applied separately to each element in a list.
$endgroup$
$begingroup$
that's also very useful and helpful thank you
$endgroup$
– argamon
Feb 19 at 22:56
add a comment |
$begingroup$
You can do it without iterators because the functions you need (Mod
, DivisorSigma
) are Listable
:
Mod[DivisorSigma[1, Range[20]], 13]
{1, 3, 4, 7, 6, 12, 8, 2, 0, 5, 12, 2, 1, 11, 11, 5, 5, 0, 7, 3}
Note: Listable
functions are applied separately to each element in a list.
$endgroup$
You can do it without iterators because the functions you need (Mod
, DivisorSigma
) are Listable
:
Mod[DivisorSigma[1, Range[20]], 13]
{1, 3, 4, 7, 6, 12, 8, 2, 0, 5, 12, 2, 1, 11, 11, 5, 5, 0, 7, 3}
Note: Listable
functions are applied separately to each element in a list.
answered Feb 19 at 22:51
kglrkglr
189k10206424
189k10206424
$begingroup$
that's also very useful and helpful thank you
$endgroup$
– argamon
Feb 19 at 22:56
add a comment |
$begingroup$
that's also very useful and helpful thank you
$endgroup$
– argamon
Feb 19 at 22:56
$begingroup$
that's also very useful and helpful thank you
$endgroup$
– argamon
Feb 19 at 22:56
$begingroup$
that's also very useful and helpful thank you
$endgroup$
– argamon
Feb 19 at 22:56
add a comment |