cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A332054 Tower of 9's modulo n.

Original entry on oeis.org

0, 1, 0, 1, 4, 3, 1, 1, 0, 9, 5, 9, 1, 1, 9, 9, 9, 9, 1, 9, 15, 5, 8, 9, 14, 1, 0, 1, 9, 9, 4, 9, 27, 9, 29, 9, 1, 1, 27, 9, 9, 15, 11, 5, 9, 31, 32, 9, 15, 39, 9, 1, 9, 27, 49, 1, 39, 9, 57, 9, 34, 35, 36, 9, 14, 27, 22, 9, 54, 29, 12, 9, 72, 1, 39, 1, 71, 27
Offset: 1

Views

Author

Jinyuan Wang, Mar 03 2020

Keywords

Comments

a(n) = (9^(9^(9^(9^ ... )))) mod n, provided sufficient 9's are in the tower such that adding more doesn't affect the value of a(n).

Crossrefs

Programs

  • PARI
    a(n) = {my(b, c=0, d=n, k=1, x=1); while(k==1, z=x; y=1; b=1; while(z>0, while(y
    				

Formula

a(n) = 9^a(A000010(n)) mod n.
a(n) = (9^^k) mod n, if n < A246497(k), where ^^ is Knuth's double-arrow notation.

A336111 A non-symmetrical rectangular array read by antidiagonals: A(n,m) is the tower of powers of n modulo m.

Original entry on oeis.org

0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 3, 1, 1, 0, 1, 4, 2, 0, 2, 0, 0, 1, 2, 3, 1, 1, 0, 1, 0, 1, 0, 6, 4, 0, 0, 1, 0, 0, 1, 7, 3, 4, 5, 1, 3, 1, 1, 0, 1, 6, 0, 0, 3, 0, 3, 0, 0, 0, 0, 1, 9, 7, 4, 5, 1, 1, 1, 1, 1, 1, 0, 1, 4, 9, 6, 2, 0, 0, 4, 4, 0, 2, 0, 0
Offset: 1

Views

Author

Jinyuan Wang and Robert G. Wilson v, Apr 15 2020

Keywords

Comments

Although all numbers appear to be present, 1 appears most often followed by 0.
Since the first column and main diagonal are equal to 0, all matrices whose upper left corner is on the main diagonal have as their determinant 0.

Examples

			\m   1  2  3  4  5  6  7  8  9 10 11 12 13  14  15  16 ...
n\
_1   0  1  1  1  1  1  1  1  1  1  1  1  1   1   1   1
_2   0  0  1  0  1  4  2  0  7  6  9  4  3   2   1   0
_3   0  1  0  3  2  3  6  3  0  7  9  3  1  13  12  11
_4   0  0  1  0  1  4  4  0  4  6  4  4  9   4   1   0
_5   0  1  2  1  0  5  3  5  2  5  1  5  5   3   5   5
_6   0  0  0  0  1  0  1  0  0  6  5  0  1   8   6   0
_7   0  1  1  3  3  1  0  7  7  3  2  7  6   7  13   7
_8   0  0  1  0  1  4  1  0  1  6  3  4  1   8   1   0
_9   0  1  0  1  4  3  1  1  0  9  5  9  1   1   9   9
10   0  0  1  0  0  4  4  0  1  0  1  4  3   4  10   0
etc, .
		

References

  • Ilan Vardi, "Computational Recreations in Mathematica," Addison-Wesley Publishing Co., Redwood City, CA, 1991, pages 226-229.

Crossrefs

Programs

  • Mathematica
    (* first load all lines of Super Power Mod by Ilan Vardi from the hyper-link *)
    Table[ SuperPowerMod[n - m + 1, 2^100, m], {n, 14}, {m, n, 1, -1}] // Flatten (* or *)
    a[b_, 1] = 0; a[b_, n_] := PowerMod[b, If[OddQ@ b, a[b, EulerPhi[n]], EulerPhi[n] + a[b, EulerPhi[n]]], n]; Table[a[b - m + 1, m], {b, 14}, {m, b, 1, -1}] // Flatten
Showing 1-2 of 2 results.