login
A318960
One of the two successive approximations up to 2^n for the 2-adic integer sqrt(-7). This is the 1 (mod 4) case.
18
1, 5, 5, 21, 53, 53, 181, 181, 181, 181, 181, 181, 181, 16565, 49333, 49333, 49333, 49333, 573621, 1622197, 1622197, 1622197, 10010805, 10010805, 10010805, 77119669, 211337397, 479772853, 479772853, 479772853, 2627256501, 6922223797, 15512158389, 15512158389
OFFSET
2,2
COMMENTS
a(n) is the unique number k in [1, 2^n] and congruent to 1 (mod 4) such that k^2 + 7 is divisible by 2^(n+1).
The 2-adic integers are very different from p-adic ones where p is an odd prime. For example, provided that there is at least one solution, the number of solutions to x^n = a over p-adic integers is gcd(n, p-1) for odd primes p and gcd(n, 2) for p = 2. For odd primes p, x^2 = a is solvable iff a is a quadratic residue modulo p, while for p = 2 it's solvable iff a == 1 (mod 8). If gcd(n, p-1) > 1 and gcd(a, p) = 1, then the solutions to x^n = a differ starting at the rightmost digit for odd primes p, while for p = 2 they differ starting at the next-to-rightmost digit. As a result, the formulas and the program here are different from those in other entries related to p-adic integers.
LINKS
Jianing Song, Table of n, a(n) for n = 2..999 (offset corrected by Jianing Song)
G. P. Michon, Introduction to p-adic integers, Numericana.
FORMULA
a(2) = 1; for n >= 3, a(n) = a(n-1) if a(n-1)^2 + 7 is divisible by 2^(n+1), otherwise a(n-1) + 2^(n-1).
a(n) = 2^n - A318961(n).
a(n) = Sum_{i=0..n-1} A318962(i)*2^i.
EXAMPLE
The unique number k in [1, 4] and congruent to 1 modulo 4 such that k^2 + 7 is divisible by 8 is 1, so a(2) = 1.
a(2)^2 + 7 = 8 which is not divisible by 16, so a(3) = a(2) + 2^2 = 5.
a(3)^2 + 7 = 32 which is divisible by 32, so a(4) = a(3) = 5.
a(4)^2 + 7 = 32 which is not divisible by 64, so a(5) = a(4) + 2^4 = 21.
a(5)^2 + 7 = 448 which is divisible by 128, so a(6) = a(5) + 2^5 = 53.
... [Typo corrected by Jianing Song, Dec 14 2025]
PROG
(PARI) a(n) = truncate(-sqrt(-7+O(2^(n+1))))
CROSSREFS
Sequences related to p-adic roots to quadratic polynomials:
A318960, A318961, A318962, A318963 (2-adic, sqrt(-7));
A341600, A341601, A341602, A341603 (2-adic, sqrt(-3/5));
A341538, A341539, A322217, A341540 (2-adic, sqrt(17));
A268924, A271222, A271223, A271224 (3-adic, sqrt(-2));
A327302, A327303, A327304, A327305 (5-adic, sqrt(-9));
A324027, A324028, A324029, A324030 (5-adic, sqrt(-6));
A268922, A269590, A269591, A269592 (5-adic, sqrt(-4));
A048898, A048899, A210850, A210851 (5-adic, sqrt(-1));
A324023, A324024, A324025, A324026 (5-adic, sqrt(6)).
A290800, A290802, A290794, A290795 (7-adic, sqrt(-6));
A290806, A290809, A290798, A290799 (7-adic, sqrt(-5));
A290803, A290804, A290796, A290797 (7-adic, sqrt(-3));
A210852, A212153, A212152, A212155 (7-adic, (1+sqrt(-3))/2);
A290557, A290559, A051277, A290558 (7-adic, sqrt(2));
A321072, A321073, A321074, A321075 (11-adic, sqrt(3));
A322089, A322090, A322091, A322092 (13-adic, sqrt(-3));
A286840, A286841, A286838, A286839 (13-adic, sqrt(-1));
A322085, A322086, A322087, A322088 (13-adic, sqrt(3));
A322563, A322564, A322565, A322566 (17-adic, sqrt(-2));
A286877, A286878, A309989, A309990 (17-adic, sqrt(-1));
A322559, A322560, A322561, A322562 (17-adic, sqrt(2)).
Sequence in context: A241864 A243121 A007028 * A097336 A365104 A014619
KEYWORD
nonn
AUTHOR
Jianing Song, Sep 06 2018
EXTENSIONS
Offset corrected by Jianing Song, Aug 28 2019
STATUS
approved