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.

A332084 Triangle read by rows: T(n,k) is the smallest m >= 0 such that floor(Pi*n^m) == k (mod n), -1 if one does not exist, k = 0..n-1.

Original entry on oeis.org

0, 1, 0, 0, 2, 4, 1, 3, 2, 0, 1, 7, 3, 0, 8, 1, 9, 14, 0, 10, 2, 1, 7, 10, 0, 8, 6, 2, 3, 1, 8, 0, 9, 6, 14, 5, 10, 1, 2, 0, 3, 20, 18, 11, 5, 32, 1, 6, 0, 2, 4, 7, 13, 11, 5, 5, 1, 8, 0, 13, 4, 2, 6, 9, 24, 12, 5, 1, 22, 0, 3, 17, 14, 18, 2, 6, 20, 10, 5, 1, 10, 0, 6, 9, 17, 14, 23, 7, 2, 21, 3
Offset: 1

Views

Author

Davis Smith, Aug 22 2020

Keywords

Comments

Pi is normal in base n >= 2 if and only if in every row N, such that N is a power of n, -1 does not appear. Pi is absolutely normal if and only if -1 never appears.
Conjecture: Pi is absolutely normal, meaning that -1 will never appear.
This triangle is an instance of the more general f(n,k,r), where f(n,k,r) is the smallest m >= 0 such that floor(r*n^m) == k (mod n) (-1 if one does not exist) and r is irrational. The same conditions for normalcy apply.

Examples

			The triangle T(n,k) starts:
n\k   0   1   2   3   4   5   6   7   8   9  10  11  12 ...
1:    0
2:    1   0
3:    0   2   4
4:    1   3   2   0
5:    1   7   3   0   8
6:    1   9  14   0  10   2
7:    1   7  10   0   8   6   2
8:    3   1   8   0   9   6  14   5
9:   10   1   2   0   3  20  18  11   5
10:  32   1   6   0   2   4   7  13  11   5
11:   5   1  22   0  13   4   2   6   9  24  12
12:   5   1  10   0   3  17  14  18   2   6  20  10
13:   5   1  10   0   6   9  17  14  23   7   2  21   3
		

Crossrefs

Positions of 0 through 9 in base 10: A037000, A037001, A037002, A037003, A037004, A037005, A036974, A037006, A037007, A037008.

Programs

  • PARI
    A332084_row(n)={my(L=List(vector(n,z,-1)), m=-1); while(vecmin(Vec(L))==-1, my(Z=lift(Mod(floor(Pi*n^(m++)),n))+1); if(L[Z]<0,listput(L,m,Z))); Vec(L)}

Formula

T(n,3) = 0, n > 3.