login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A175623
Triangle read by rows: T(n,k) = prime(k)^(n-1) mod n, 1<=k<=n.
1
0, 0, 1, 1, 0, 1, 0, 3, 1, 3, 1, 1, 0, 1, 1, 2, 3, 5, 1, 5, 1, 1, 1, 1, 0, 1, 1, 1, 0, 3, 5, 7, 3, 5, 1, 3, 4, 0, 7, 4, 4, 7, 1, 1, 7, 2, 3, 5, 7, 1, 3, 7, 9, 3, 9, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 8, 3, 5, 7, 11, 1, 5, 7, 11, 5, 7, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1
OFFSET
1,8
LINKS
EXAMPLE
Triangle begins:
0;
0, 1;
1, 0, 1;
0, 3, 1, 3;
1, 1, 0, 1, 1;
MATHEMATICA
T[n_, k_] := Mod[ Prime[k]^(n - 1), n]; Table[ T[n, k], {n, 13}, {k, n}] // Flatten
Flatten[Table[PowerMod[Prime[k], n-1, n], {n, 20}, {k, n}]] (* Harvey P. Dale, Oct 13 2015 *)
PROG
(Magma)
[Modexp(NthPrime(k), n-1, n): k in [1..n], n in [1..15]]; // G. C. Greubel, Apr 12 2024
(SageMath)
flatten([[pow(nth_prime(k), n-1, n) for k in range(1, n+1)] for n in range(1, 16)]) # G. C. Greubel, Apr 12 2024
CROSSREFS
KEYWORD
nonn,easy,tabl
AUTHOR
STATUS
approved