A271224 Digits of one of the two 3-adic integers sqrt(-2). Here the sequence with first digit 2.
2, 1, 0, 2, 2, 0, 2, 1, 2, 2, 2, 0, 1, 0, 2, 1, 2, 1, 1, 2, 0, 0, 2, 1, 1, 1, 0, 0, 0, 2, 2, 2, 0, 1, 2, 1, 0, 2, 0, 0, 2, 0, 2, 1, 0, 2, 1, 0, 0, 0, 1, 2, 0, 2, 1, 0, 2, 0, 2, 2, 1
Offset: 0
Examples
a(4) = 2 because 2*59*2 + 43 = 279 == 0 (mod 3). a(4) = - 43*(2*59) (mod 3) = -1*(2*(-1)) (mod 3) = 2. A271222(5) = 221 = 2*3^0 + 1*3^1 + 0*3^2 + 2*3^3 + 2*3^4.
References
- Trygve Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964, pp. 86 and 77-78.
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..10000
- Peter Bala, A note on A268924 and A271222, Nov 28 2022.
- BCMATH Congruence Programs, Finding a p-adic square root of a quadratic residue (mod p), p an odd prime.
Programs
-
PARI
a(n) = truncate(-sqrt(-2+O(3^(n+1))))\3^n; \\ Michel Marcus, Apr 09 2016
Comments