OFFSET
2,1
COMMENTS
a(n) is the unique number k in [1, 2^n] and congruent to 3 (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
EXAMPLE
The unique number k in [1, 4] and congruent to 3 modulo 4 such that k^2 + 7 is divisible by 8 is 3, so a(2) = 3.
a(2)^2 + 7 = 16 which is divisible by 16, so a(3) = a(2) = 3.
a(3)^2 + 7 = 16 which is not divisible by 32, so a(4) = a(3) + 2^3 = 11.
a(4)^2 + 7 = 128 which is divisible by 64, so a(5) = a(4) = 11.
a(5)^2 + 7 = 128 which is divisible by 128, so a(6) = a(5) = 11.
...
PROG
(PARI) a(n) = if(n==2, 3, truncate(sqrt(-7+O(2^(n+1)))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Sep 06 2018
EXTENSIONS
Offset corrected by Jianing Song, Aug 28 2019
STATUS
approved