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!)
A049759 Triangular array T read by rows: T(n,k)=n^2 mod k, for k=1,2,...,n, n=1,2,... 7

%I #25 Sep 08 2022 08:44:58

%S 0,0,0,0,1,0,0,0,1,0,0,1,1,1,0,0,0,0,0,1,0,0,1,1,1,4,1,0,0,0,1,0,4,4,

%T 1,0,0,1,0,1,1,3,4,1,0,0,0,1,0,0,4,2,4,1,0,0,1,1,1,1,1,2,1,4,1,0,0,0,

%U 0,0,4,0,4,0,0,4,1,0,0,1,1,1,4,1,1,1,7,9,4,1,0

%N Triangular array T read by rows: T(n,k)=n^2 mod k, for k=1,2,...,n, n=1,2,...

%H G. C. Greubel, <a href="/A049759/b049759.txt">Rows n = 1..100 of triangle, flattened</a>

%e Triangle begins:

%e 0;

%e 0, 0;

%e 0, 1, 0;

%e 0, 0, 1, 0;

%e 0, 1, 1, 1, 0;

%e 0, 0, 0, 0, 1, 0;

%e 0, 1, 1, 1, 4, 1, 0;

%e 0, 0, 1, 0, 4, 4, 1, 0;

%e 0, 1, 0, 1, 1, 3, 4, 1, 0;

%e 0, 0, 1, 0, 0, 4, 2, 4, 1, 0;

%e 0, 1, 1, 1, 1, 1, 2, 1, 4, 1, 0;

%e 0, 0, 0, 0, 4, 0, 4, 0, 0, 4, 1, 0;

%e 0, 1, 1, 1, 4, 1, 1, 1, 7, 9, 4, 1, 0;

%p seq(seq( `mod`(n^2, k), k = 1..n), n = 1..15); # _G. C. Greubel_, Dec 13 2019

%t Table[PowerMod[n,2,k], {n,15}, {k,n}]//Flatten (* _G. C. Greubel_, Dec 13 2019 *)

%o (PARI) tabl(nn) = {for (n=1, nn, for (k=1, n, print1(n^2 % k, ", ");); print(););} \\ _Michel Marcus_, Mar 31 2014

%o (Magma) [[Modexp(n,2,k): k in [1..n]]: n in [1..15]]; // _G. C. Greubel_, Dec 13 2019

%o (Sage) [[power_mod(n,2,k) for k in (1..n)] for n in (1..15)] # _G. C. Greubel_, Dec 13 2019

%o (GAP) Flat(List([1..15], n-> List([1..n], k-> PowerMod(n,2,k) ))); # _G. C. Greubel_, Dec 13 2019

%Y Cf. A048152.

%K nonn,tabl

%O 1,26

%A _Clark Kimberling_

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 18 13:46 EDT 2024. Contains 371780 sequences. (Running on oeis4.)