login
Irregular triangle read by rows: for n >= 1 row n lists the k from [1, 2, ... , n] such that A002378(k-1) = (k-1)*k == 0 (mod n).
1

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

%S 1,1,2,1,3,1,4,1,5,1,3,4,6,1,7,1,8,1,9,1,5,6,10,1,11,1,4,9,12,1,13,1,

%T 7,8,14,1,6,10,15,1,16,1,17,1,9,10,18,1,19,1,5,16,20,1,7,15,21,1,11,

%U 12,22,1,23,1,9,16,24,1,25

%N Irregular triangle read by rows: for n >= 1 row n lists the k from [1, 2, ... , n] such that A002378(k-1) = (k-1)*k == 0 (mod n).

%C n-th row length gives 1 for n = 1, and 2^A001221(n) for n >= 2 , that is A034444(n). [Proof: Unique lifting theorem (e.g., Apostol, 5.30 (a), p.121) for this congruence, and only two solutions 1 and p for primes p. See also the Yuval Dekel, Sep 21 2003, comment in A034444. - _Wolfdieter Lang_, Feb 05 2020]

%D Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1986.

%e The irregular triangle T(n,k) begins

%e n\k 1 2 3 4 ...

%e 1: 1

%e 2: 1 2

%e 3: 1 3

%e 4: 1 4

%e 5: 1 5

%e 6: 1 3 4 6

%e 7: 1 7

%e 8: 1 8

%e 9: 1 9

%e 10: 1 5 6 10

%e 11: 1 11

%e 12: 1 4 9 12

%e 13: 1 13

%e 14: 1 7 8 14

%e 15: 1 6 10 15

%e 16: 1 16

%e 17: 1 17

%e 18: 1 9 10 18

%e 19: 1 19

%e 20: 1 5 16 20

%e ...

%t Table[Select[Range@ n, Mod[-n + # (# - 1), n] == 0 &], {n, 25}] // Flatten (* _Michael De Vlieger_, Nov 18 2019 *)

%o (Magma) [[k: k in [1..n] | k^2 mod n eq k]: n in [1..38]];

%o (PARI) row(n) = select(x->(Mod(x, n) == Mod(x, n)^2), [1..n]); \\ _Michel Marcus_, Nov 19 2019

%Y Cf. A000010, A000225, A000688, A000961, A001221, A006881, A006530, A007875, A020639, A024619, A034444, A077610, A135972, A309307.

%K nonn,easy,tabf

%O 1,3

%A _Juri-Stepan Gerasimov_, Nov 15 2019

%E Edited by _Wolfdieter Lang_, Feb 05 2020