login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A337633 Triangle read by rows: T(n,k) is the number of nonnegative integers m < n such that m^k + m == 0 (mod n), where 0 <= k < n. 3

%I #21 Sep 08 2022 08:46:25

%S 1,1,2,1,1,2,1,2,2,1,1,1,2,3,2,1,2,4,2,4,2,1,1,2,1,4,1,2,1,2,2,1,2,1,

%T 2,1,1,1,2,1,4,1,2,1,2,1,2,4,6,4,2,4,6,4,2,1,1,2,1,2,1,6,1,2,1,2,1,2,

%U 4,1,4,1,4,1,4,1,4,1,1,1,2,3,4,1,2,7,2

%N Triangle read by rows: T(n,k) is the number of nonnegative integers m < n such that m^k + m == 0 (mod n), where 0 <= k < n.

%H Peter Kagey, <a href="/A337633/b337633.txt">Table of n, a(n) for n = 1..10011</a> (first 141 rows, flattened)

%F T(n,k) = A337632(n,k)/A334006(n,k).

%e Triangle begins:

%e n\k| 0 1 2 3 4 5 6 7 8 9

%e ---+-----------------------------

%e 1 | 1;

%e 2 | 1, 2;

%e 3 | 1, 1, 2;

%e 4 | 1, 2, 2, 1;

%e 5 | 1, 1, 2, 3, 2;

%e 6 | 1, 2, 4, 2, 4, 2;

%e 7 | 1, 1, 2, 1, 4, 1, 2;

%e 8 | 1, 2, 2, 1, 2, 1, 2, 1;

%e 9 | 1, 1, 2, 1, 4, 1, 2, 1, 2;

%e 10 | 1, 2, 4, 6, 4, 2, 4, 6, 4, 2;

%e ...

%e T(10, 2) = 4 because

%e 0^2 + 0 == 0 (mod 10),

%e 4^2 + 4 == 0 (mod 10),

%e 5^2 + 5 == 0 (mod 10), and

%e 9^2 + 9 == 0 (mod 10).

%o (Haskell)

%o a337633t n k = length $ filter (\m -> (m^k + m) `mod` n == 0) [0..n-1]

%o (Magma) [[#[m: m in [0..n-1] | -m^k mod n eq m]: k in [0..n-1]]: n in [1..17]]; // _Juri-Stepan Gerasimov_, Oct 12 2020

%Y Cf. A333570, A334006, A337632.

%K nonn,tabl

%O 1,3

%A _Peter Kagey_, Sep 12 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)