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-6 of 6 results.

A318963 Digits of one of the two 2-adic integers sqrt(-7) that ends in 11.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0
Offset: 0

Views

Author

Jianing Song, Sep 06 2018

Keywords

Comments

Over the 2-adic integers there are 2 solutions to x^2 = -7, one ends in 01 and the other ends in 11. This sequence gives the latter one. See A318961 for detailed information.

Examples

			...01001110001100011011001110011111101001011.
		

Crossrefs

Cf. A318961.
Digits of p-adic integers:
A318962, this sequence (2-adic, sqrt(-7));
A271223, A271224 (3-adic, sqrt(-2));
A269591, A269592 (5-adic, sqrt(-4));
A210850, A210851 (5-adic, sqrt(-1));
A290566 (5-adic, 2^(1/3));
A290563 (5-adic, 3^(1/3));
A290794, A290795 (7-adic, sqrt(-6));
A290798, A290799 (7-adic, sqrt(-5));
A290796, A290797 (7-adic, sqrt(-3));
A212152, A212155 (7-adic, (1+sqrt(-3))/2);
A051277, A290558 (7-adic, sqrt(2));
A286838, A286839 (13-adic, sqrt(-1));
A309989, A309990 (17-adic, sqrt(-1)).
Also there are numerous sequences related to digits of 10-adic integers.

Programs

  • PARI
    a(n) = if(n==1, 1, truncate(sqrt(-7+O(2^(n+2))))\2^n)

Formula

a(0) = a(1) = 1; for n >= 2, a(n) = 0 if A318961(n)^2 + 7 is divisible by 2^(n+2), otherwise 1.
a(n) = 1 - A318962(n) for n >= 1.
For n >= 2, a(n) = (A318961(n+1) - A318961(n))/2^n.

Extensions

Corrected by Jianing Song, Aug 28 2019

A318960 One of the two successive approximations up to 2^n for 2-adic integer sqrt(-7). This is the 1 (mod 4) case.

Original entry on oeis.org

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

Views

Author

Jianing Song, Sep 06 2018

Keywords

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.

Examples

			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 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.
...
		

Crossrefs

Cf. A318962.
Expansions of p-adic integers:
this sequence, A318961 (2-adic, sqrt(-7));
A268924, A271222 (3-adic, sqrt(-2));
A268922, A269590 (5-adic, sqrt(-4));
A048898, A048899 (5-adic, sqrt(-1));
A290567 (5-adic, 2^(1/3));
A290568 (5-adic, 3^(1/3));
A290800, A290802 (7-adic, sqrt(-6));
A290806, A290809 (7-adic, sqrt(-5));
A290803, A290804 (7-adic, sqrt(-3));
A210852, A212153 (7-adic, (1+sqrt(-3))/2);
A290557, A290559 (7-adic, sqrt(2));
A286840, A286841 (13-adic, sqrt(-1));
A286877, A286878 (17-adic, sqrt(-1)).
Also expansions of 10-adic integers:
A007185, A010690 (nontrivial roots to x^2-x);
A216092, A216093, A224473, A224474 (nontrivial roots to x^3-x).

Programs

  • PARI
    a(n) = truncate(-sqrt(-7+O(2^(n+1))))

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.

Extensions

Offset corrected by Jianing Song, Aug 28 2019

A341538 One of the two successive approximations up to 2^n for 2-adic integer sqrt(17). This is the 1 (mod 4) case.

Original entry on oeis.org

1, 1, 9, 9, 41, 105, 233, 233, 745, 1769, 1769, 1769, 9961, 9961, 9961, 75497, 206569, 206569, 206569, 1255145, 1255145, 5449449, 13838057, 30615273, 64169705, 64169705, 64169705, 332605161, 869476073, 869476073, 869476073, 5164443369, 13754377961, 13754377961
Offset: 2

Views

Author

Jianing Song, Feb 13 2021

Keywords

Comments

a(n) is the unique number k in [1, 2^n] and congruent to 1 mod 4 such that k^2 - 17 is divisible by 2^(n+1).

Examples

			The unique number k in [1, 4] and congruent to 1 modulo 4 such that k^2 - 17 is divisible by 8 is 1, so a(2) = 1.
a(2)^2 - 17 = -16 which is divisible by 16, so a(3) = a(2) = 1.
a(3)^2 - 17 = -16 which is not divisible by 32, so a(4) = a(3) + 2^3 = 9.
a(4)^2 - 17 = 64 which is divisible by 64, so a(5) = a(4) = 9.
a(5)^2 - 17 = 64 which is not divisible by 128, so a(6) = a(5) + 2^5 = 41.
...
		

Crossrefs

Cf. A341539 (the 3 (mod 4) case), A322217 (digits of the associated 2-adic square root of 17), A318960, A318961 (successive approximations of sqrt(-7)).

Programs

  • PARI
    a(n) = truncate(sqrt(17+O(2^(n+1))))

Formula

a(2) = 1; for n >= 3, a(n) = a(n-1) if a(n-1)^2 - 17 is divisible by 2^(n+1), otherwise a(n-1) + 2^(n-1).
a(n) = 2^n - A341539(n).
a(n) = Sum_{i=0..n-1} A322217(i)*2^i.

A341539 One of the two successive approximations up to 2^n for 2-adic integer sqrt(17). This is the 3 (mod 4) case.

Original entry on oeis.org

3, 7, 7, 23, 23, 23, 23, 279, 279, 279, 2327, 6423, 6423, 22807, 55575, 55575, 55575, 317719, 842007, 842007, 2939159, 2939159, 2939159, 2939159, 2939159, 70048023, 204265751, 204265751, 204265751, 1278007575, 3425491223, 3425491223, 3425491223, 20605360407
Offset: 2

Views

Author

Jianing Song, Feb 13 2021

Keywords

Comments

a(n) is the unique number k in [1, 2^n] and congruent to 3 mod 4 such that k^2 - 17 is divisible by 2^(n+1).

Examples

			The unique number k in [1, 4] and congruent to 3 modulo 4 such that k^2 - 17 is divisible by 8 is 3, so a(2) = 3.
a(2)^2 - 17 = -8 which is not divisible by 16, so a(3) = a(2) + 2^2 = 7.
a(3)^2 - 17 = 32 which is divisible by 32, so a(4) = a(3) = 7.
a(4)^2 - 17 = 32 which is not divisible by 64, so a(5) = a(4) + 2^4 = 23.
a(5)^2 - 17 = 512 which is divisible by 128, so a(6) = a(5) = 23.
...
		

Crossrefs

Cf. A341538 (the 1 (mod 4) case), A341540 (digits of the associated 2-adic square root of 17), A318960, A318961 (successive approximations of sqrt(-7)).

Programs

  • Mathematica
    Table[First@Select[PowerModList[17,1/2,2^(k+1)],Mod[#,4]==3&],{k,2,35}] (* Giorgos Kalogeropoulos, Oct 22 2022 *)
  • PARI
    a(n) = if(n==2, 3, truncate(-sqrt(17+O(2^(n+1)))))

Formula

a(2) = 3; for n >= 3, a(n) = a(n-1) if a(n-1)^2 - 17 is divisible by 2^(n+1), otherwise a(n-1) + 2^(n-1).
a(n) = 2^n - A341538(n).
a(n) = Sum_{i=0..n-1} A341540(i)*2^i.

A341601 One of the two successive approximations up to 2^n for 2-adic integer sqrt(-3/5). This is the 3 (mod 4) case.

Original entry on oeis.org

3, 3, 11, 27, 59, 59, 59, 59, 571, 571, 571, 4667, 12859, 29243, 62011, 127547, 127547, 127547, 651835, 651835, 2748987, 6943291, 6943291, 6943291, 6943291, 6943291, 6943291, 6943291, 6943291, 6943291, 2154426939, 6449394235, 6449394235, 6449394235
Offset: 2

Views

Author

Jianing Song, Feb 16 2021

Keywords

Comments

a(n) is the unique number k in [1, 2^n] and congruent to 3 mod 4 such that 5*k^2 + 3 is divisible by 2^(n+1).

Examples

			The unique number k in [1, 4] and congruent to 3 modulo 4 such that 5*k^2 + 3 is divisible by 8 is 3, so a(2) = 3.
5*a(2)^2 + 3 = 48 which is divisible by 16, so a(3) = a(2) = 3.
5*a(3)^2 + 3 = 48 which is not divisible by 32, so a(4) = a(3) + 2^3 = 11.
5*a(4)^2 + 3 = 608 which is not divisible by 64, so a(5) = a(4) + 2^4 = 27.
5*a(5)^2 + 3 = 3648 which is not divisible by 128, so a(6) = a(5) + 2^5 = 59.
...
		

Crossrefs

Cf. A145231, A341600 (the 1 (mod 4) case), A341603 (digits of the associated 2-adic square root of -3/5), A318960, A318961 (successive approximations of sqrt(-7)), A341538, A341539 (successive approximations of sqrt(17)).

Programs

  • PARI
    a(n) = if(n==2, 3, truncate(sqrt(-3/5+O(2^(n+1)))))

Formula

a(2) = 3; for n >= 3, a(n) = a(n-1) if 5*a(n-1)^2 + 3 is divisible by 2^(n+1), otherwise a(n-1) + 2^(n-1).
a(n) = 2^n - A341600(n).
a(n) = Sum_{i = 0..n-1} A341603(i)*2^i.
a(n) == Fibonacci(4^n) (mod 2^n). - Peter Bala, Nov 11 2022

A341600 One of the two successive approximations up to 2^n for 2-adic integer sqrt(-3/5). This is the 1 (mod 4) case.

Original entry on oeis.org

1, 5, 5, 5, 5, 69, 197, 453, 453, 1477, 3525, 3525, 3525, 3525, 3525, 3525, 134597, 396741, 396741, 1445317, 1445317, 1445317, 9833925, 26611141, 60165573, 127274437, 261492165, 529927621, 1066798533, 2140540357, 2140540357, 2140540357, 10730474949, 27910344133
Offset: 2

Views

Author

Jianing Song, Feb 16 2021

Keywords

Comments

a(n) is the unique number k in [1, 2^n] and congruent to 1 mod 4 such that 5*k^2 + 3 is divisible by 2^(n+1).

Examples

			The unique number k in [1, 4] and congruent to 1 modulo 4 such that 5*k^2 + 3 is divisible by 8 is 1, so a(2) = 1.
5*a(2)^2 + 3 = 8 which is not divisible by 16, so a(3) = a(2) + 2^2 = 5.
5*a(3)^2 + 3 = 128 which is divisible by 32, 64 and 128, so a(6) = a(5) = a(4) = a(3) = 5.
...
		

Crossrefs

Cf. A341601 (the 3 (mod 4) case), A341602 (digits of the associated 2-adic square root of -3/5), A318960, A318961 (successive approximations of sqrt(-7)), A341538, A341539 (successive approximations of sqrt(17)).

Programs

  • PARI
    a(n) = truncate(-sqrt(-3/5+O(2^(n+1))))

Formula

a(2) = 1; for n >= 3, a(n) = a(n-1) if 5*a(n-1)^2 + 3 is divisible by 2^(n+1), otherwise a(n-1) + 2^(n-1).
a(n) = 2^n - A341601(n).
a(n) = Sum_{i=0..n-1} A341602(i)*2^i.
a(n) == Fibonacci(2^(2*n-1)) (mod 2^n). - Peter Bala, Nov 11 2022
Showing 1-6 of 6 results.