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!)
A334006 Triangle read by rows: T(n,k) = (the number of nonnegative bases m < n such that m^k == m (mod n))/(the number of nonnegative bases m < n such that -m^k == m (mod n)) for nonnegative k < n, n >= 1. 8

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

%S 1,1,1,1,3,1,1,2,1,3,1,5,1,1,1,1,3,1,3,1,3,1,7,1,3,1,3,1,1,4,1,5,1,5,

%T 1,5,1,9,1,3,1,3,1,7,1,1,5,1,1,1,5,1,1,1,5,1,11,1,3,1,3,1,3,1,3,1,1,6,

%U 1,9,1,9,1,9,1,9,1,9,1,13,1,1,1,5,1,1,1,5,1,1,1,1,7,1,3,1,3

%N Triangle read by rows: T(n,k) = (the number of nonnegative bases m < n such that m^k == m (mod n))/(the number of nonnegative bases m < n such that -m^k == m (mod n)) for nonnegative k < n, n >= 1.

%C If the sum of proper divisors of q in row q <= q, then q are 1, 2, 3, 4, 5, 8, 16, 17, 32, 64, 128, 256, 257, ...(union of Fermat primes and powers of 2).

%e Triangle T(n,k) begins:

%e n\k| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

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

%e 1 | 1;

%e 2 | 1, 1;

%e 3 | 1, 3, 1;

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

%e 5 | 1, 5, 1, 1, 1;

%e 6 | 1, 3, 1, 3, 1, 3;

%e 7 | 1, 7, 1, 3, 1, 3, 1;

%e 8 | 1, 4, 1, 5, 1, 5, 1, 5;

%e 9 | 1, 9, 1, 3, 1, 3, 1, 7, 1;

%e 10 | 1, 5, 1, 1, 1, 5, 1, 1, 1, 5;

%e 11 | 1, 11, 1, 3, 1, 3, 1, 3, 1, 3, 1;

%e 12 | 1, 6, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9;

%e 13 | 1, 13, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1;

%e 14 | 1, 7, 1, 3, 1, 3, 1, 7, 1, 3, 1, 3, 1, 7;

%e 15 | 1, 15, 1, 3, 1, 15, 1, 3, 1, 15, 1, 3, 1, 15, 1;

%e 16 | 1, 8, 1, 5, 1, 9, 1, 5, 1, 9, 1, 5, 1, 9, 1, 5;

%e 17 | 1, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;

%e ...

%e For (n, k) = (7, 3), there are three nonnegative values of m < n such that m^3 == m (mod 7) (namely 0, 1, and 6) and one nonnegative value of m < n such that -m^3 == m (mod 7) (namely 0), so T(7,3) = 3/1 = 3.

%o (Magma) [[#[m: m in [0..n-1] | m^k mod n eq m]/#[m: m in [0..n-1] | -m^k mod n eq m]: k in [0..n-1]]: n in [1..17]];

%o (PARI) T(n, k) = sum(m=0, n-1, Mod(m, n)^k == m)/sum(m=0, n-1, -Mod(m, n)^k == m);

%o matrix(7, 7, n, k, k--; if (k>=n, 0, T(n,k))) \\ to see the triangle \\ _Michel Marcus_, Apr 17 2020

%Y Cf. A000012, A000079, A002322, A010684, A019434, A023506, A026741, A182816, A333570, A337454, A337632, A337633, A337820, A337910.

%K nonn,tabl

%O 1,5

%A _Juri-Stepan Gerasimov_, Apr 12 2020

%E Name corrected by _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 20 00:26 EDT 2024. Contains 371798 sequences. (Running on oeis4.)