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-10 of 15 results. Next

A048898 One of the two successive approximations up to 5^n for the 5-adic integer sqrt(-1).

Original entry on oeis.org

0, 2, 7, 57, 182, 2057, 14557, 45807, 280182, 280182, 6139557, 25670807, 123327057, 123327057, 5006139557, 11109655182, 102662389557, 407838170807, 3459595983307, 3459595983307, 79753541295807, 365855836217682, 2273204469030182, 2273204469030182, 49956920289342682
Offset: 0

Views

Author

Michael Somos, Jul 26 1999

Keywords

Comments

This is the root congruent to 2 mod 5.
Or, residues modulo 5^n of a 5-adic solution of x^2+1=0.
The radix-5 expansion of a(n) is obtained from the n rightmost digits in the expansion of the following pentadic integer:
...422331102414131141421404340423140223032431212 = u
The residues modulo 5^n of the other 5-adic solution of x^2+1=0 are given by A048899 which corresponds to the pentadic integer -u:
...022113342030313303023040104021304221412013233 = -u
The digits of u and -u are given in A210850 and A210851, respectively. - Wolfdieter Lang, May 02 2012
For approximations for p-adic square roots see also the W. Lang link under A268922. - Wolfdieter Lang, Apr 03 2016
From Jianing Song, Sep 06 2022: (Start)
For n > 0, a(n)-1 is one of the four solutions to x^4 == -4 (mod 5^n), the one that is congruent to 1 modulo 5.
For n > 0, a(n)+1 is one of the four solutions to x^4 == -4 (mod 5^n), the one that is congruent to 3 modulo 5. (End)

Examples

			a(0)=0 because 0 satisfies any equation in integers modulo 1.
a(1)=2 because 2 is one solution of x^2+1=0 modulo 5. (The other solution is 3, which gives rise to A048899.)
a(2)=7 because the equation (5y+a(1))^2+1=0 modulo 25 means that y is 1 modulo 5.
		

References

  • J. H. Conway, The Sensual Quadratic Form, p. 118, Mathematical Association of America, 1997, The Carus Mathematical Monographs, Number 26.
  • K. Mahler, Introduction to p-Adic Numbers and Their Functions, Cambridge, 1973, p. 35.

Crossrefs

The two successive approximations up to p^n for p-adic integer sqrt(-1): this sequence and A048899 (p=5), A286840 and A286841 (p=13), A286877 and A286878 (p=17).
Cf. A000351 (powers of 5), A034939(n) = Min(a(n), A048899(n)).
Different from A034935.

Programs

  • Magma
    [n le 2 select 2*(n-1) else Self(n-1)^5 mod 5^(n-1): n in [1..30]]; // Vincenzo Librandi, Feb 29 2016
  • Mathematica
    a[0] = 0; a[1] = 2; a[n_] := a[n] = Mod[a[n-1]^5, 5^n]; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Nov 24 2011, after PARI *)
    Join[{0}, RecurrenceTable[{a[1] == 2, a[n] == Mod[a[n-1]^5, 5^n]}, a, {n, 25}]] (* Vincenzo Librandi, Feb 29 2016 *)
  • PARI
    {a(n) = if( n<2, 2, a(n-1)^5) % 5^n}
    
  • PARI
    a(n) = lift(sqrt(-1 + O(5^n))); \\ Kevin Ryde, Dec 22 2020
    

Formula

If n>0, a(n) = 5^n - A048899(n).
From Wolfdieter Lang, Apr 28 2012: (Start)
Recurrence: a(n) = a(n-1)^5 (mod 5^n), a(1) = 2, n>=2. See the J.-F. Alcover Mathematica program and the PARI program below.
a(n) == 2^(5^(n-1)) (mod 5^n), n>=1.
a(n)*a(n-1) + 1 == 0 (mod 5^(n-1)), n>=1.
(a(n)^2 + 1)/5^n = A210848(n), n>=0.
(End)
Another recurrence: a(n) = modp(a(n-1) + a(n-1)^2 + 1, 5^n), n >= 2, a(1) = 2. Here modp(a, m) is the representative from {0, 1, ..., |m|-1} of the residue class a modulo m. Note that a(n) is in the residue class of a(n-1) modulo 5^(n-1) (see Hensel lifting). - Wolfdieter Lang, Feb 28 2016
a(n) == L(5^n,2) (mod 5^n), where L(n,x) denotes the n-th Lucas polynomial of A114525. - Peter Bala, Nov 20 2022

Extensions

Additional comments from Gerard P. Michon, Jul 15 2009
Edited by N. J. A. Sloane, Jul 25 2009
Name clarified by Wolfdieter Lang, Feb 19 2016

A286841 One of the two successive approximations up to 13^n for 13-adic integer sqrt(-1). Here the 8 (mod 13) case (except for n=0).

Original entry on oeis.org

0, 8, 99, 1958, 28322, 228249, 2827300, 55922199, 808904403, 9781942334, 52199939826, 603633907222, 11356596271444, 11356596271444, 1828607235824962, 37264994707118563, 651495710876207647, 5974828584341646375, 49226908181248336040
Offset: 0

Views

Author

Seiichi Manyama, Aug 01 2017

Keywords

Crossrefs

The two successive approximations up to p^n for p-adic integer sqrt(-1): A048898 and A048899 (p=5), A286840 and this sequence (p=13), A286877 and A286878 (p=17).

Programs

  • Mathematica
    {0}~Join~Table[#&@@Select[PowerModList[-1, 1/2, 13^k], Mod[#, 13] == 8 &], {k, 18}] (* Giorgos Kalogeropoulos, Oct 22 2022 *)
  • PARI
    a(n) = if (n, 13^n - truncate(sqrt(-1+O(13^n))), 0); \\ Michel Marcus, Aug 04 2017
  • Python
    def A(k, m, n):
        ary=[0]
        a, mod = k, m
        for i in range(n):
              b=a%mod
              ary.append(b)
              a=b**m
              mod*=m
        return ary
    def a286841(n):
        return A(8, 13, n)
    print(a286841(100)) # Indranil Ghosh, Aug 03 2017, after Ruby
    
  • Ruby
    def A(k, m, n)
      ary = [0]
      a, mod = k, m
      n.times{
        b = a % mod
        ary << b
        a = b ** m
        mod *= m
      }
      ary
    end
    def A286841(n)
      A(8, 13, n)
    end
    p A286841(100)
    

Formula

If n > 0, a(n) = 13^n - A286840(n).
a(0) = 0 and a(1) = 8, a(n) = a(n-1) + 4 * (a(n-1)^2 + 1) mod 13^n for n > 1.
a(n) == L(13^n,8) (mod 13^n) == (4 + sqrt(17))^(13^n) + (4 - sqrt(17))^(13^n) (mod 13^n), where L(n,x) denotes the n-th Lucas polynomial of A114525. - Peter Bala, Nov 20 2022

A286877 One of the two successive approximations up to 17^n for 17-adic integer sqrt(-1). Here the 4 (mod 17) case (except for n=0).

Original entry on oeis.org

0, 4, 38, 2928, 27493, 1029745, 23747457, 313398285, 3596107669, 94280954402, 450044583893, 28673959190179, 28673959190179, 3524407382568745, 13428985415474682, 13428985415474682, 42949774758062711577, 91610966633729580058, 6709533061724423693474
Offset: 0

Views

Author

Seiichi Manyama, Aug 02 2017

Keywords

Comments

x = ...GC5A24,
x^2 = ...GGGGGG = -1.

Examples

			a(1) = (   4)_17 = 4,
a(2) = (  24)_17 = 38,
a(3) = ( A24)_17 = 2928,
a(4) = (5A24)_17 = 27493.
		

Crossrefs

The two successive approximations up to p^n for p-adic integer sqrt(-1): A048898 and A048899 (p=5), A286840 and A286841 (p=13), this sequence and A286878 (p=17).

Programs

  • PARI
    a(n) = truncate(sqrt(-1+O(17^n))); \\ Michel Marcus, Aug 04 2017
  • Python
    def A(k, m, n):
        ary=[0]
        a, mod = k, m
        for i in range(n):
              b=a%mod
              ary.append(b)
              a=b**m
              mod*=m
        return ary
    def a286877(n):
        return A(4, 17, n)
    print(a286877(100)) # Indranil Ghosh, Aug 03 2017
    
  • Ruby
    def A(k, m, n)
      ary = [0]
      a, mod = k, m
      n.times{
        b = a % mod
        ary << b
        a = b ** m
        mod *= m
      }
      ary
    end
    def A286877(n)
      A(4, 17, n)
    end
    p A286877(100)
    

Formula

a(0) = 0 and a(1) = 4, a(n) = a(n-1) + 2 * (a(n-1)^2 + 1) mod 17^n for n > 1.
a(n) == L(17^n,4) (mod 17^n) == (2 + sqrt(5))^(17^n) + (2 - sqrt(5))^(17^n) (mod 17^n), where L(n,x) denotes the n-th Lucas polynomial of A114525. - Peter Bala, Dec 02 2022

A286878 One of the two successive approximations up to 17^n for 17-adic integer sqrt(-1). Here the 13 (mod 17) case (except for n=0).

Original entry on oeis.org

0, 13, 251, 1985, 56028, 390112, 390112, 96940388, 3379649772, 24306922095, 1565949316556, 5597937117454, 553948278039582, 6380170650337192, 154948841143926247, 2848994066094341111, 5711417117604156904, 735629295252607184119, 7353551390343301297535
Offset: 0

Views

Author

Seiichi Manyama, Aug 02 2017

Keywords

Comments

x = ...04B6ED,
x^2 = ...GGGGGG = -1.

Examples

			a(1) = (   D)_17 = 13,
a(2) = (  ED)_17 = 251,
a(3) = ( 6ED)_17 = 1985,
a(4) = (B6ED)_17 = 56028.
		

Crossrefs

The two successive approximations up to p^n for p-adic integer sqrt(-1): A048898 and A048899 (p=5), A286840 and A286841 (p=13), A286877 and this sequence (p=17).

Programs

  • PARI
    a(n) = if (n, 17^n-truncate(sqrt(-1+O(17^n))), 0); \\ Michel Marcus, Aug 04 2017
  • Python
    def A(k, m, n):
          ary=[0]
          a, mod = k, m
          for i in range(n):
              b=a%mod
              ary.append(b)
              a=b**m
              mod*=m
          return ary
    def a286878(n): return A(13, 17, n)
    print(a286878(100)) # Indranil Ghosh, Aug 03 2017, after Ruby
    
  • Ruby
    def A(k, m, n)
      ary = [0]
      a, mod = k, m
      n.times{
        b = a % mod
        ary << b
        a = b ** m
        mod *= m
      }
      ary
    end
    def A286878(n)
      A(13, 17, n)
    end
    p A286878(100)
    

Formula

If n > 0, a(n) = 17^n - A286877(n).
a(0) = 0 and a(1) = 13, a(n) = a(n-1) + 15 * (a(n-1)^2 + 1) mod 17^n for n > 1.

A324077 One of the four successive approximations up to 13^n for 13-adic integer 3^(1/4).This is the 2 (mod 13) case (except for n = 0).

Original entry on oeis.org

0, 2, 28, 1211, 3408, 346140, 2573898, 60495606, 311489674, 6837335442, 70464331680, 208322823529, 18129926763899, 111322267253823, 1928572906807341, 29490207606702364, 438977351719428420, 7093143443551226830, 15743559362932564763, 1365208442786421282311
Offset: 0

Views

Author

Jianing Song, Sep 01 2019

Keywords

Comments

For n > 0, a(n) is the unique number k in [1, 13^n] and congruent to 2 mod 13 such that k^4 - 3 is divisible by 13^n.
For k not divisible by 13, k is a fourth power in 13-adic field if and only if k == 1, 3, 9 (mod 13). If k is a fourth power in 13-adic field, then k has exactly 4 fourth-power roots.

Examples

			The unique number k in [1, 13^2] and congruent to 2 modulo 13 such that k^4 - 3 is divisible by 13^2 is k = 28, so a(2) = 28.
The unique number k in [1, 13^3] and congruent to 2 modulo 13 such that k^4 - 3 is divisible by 13^3 is k = 1211, so a(3) = 1211.
		

Crossrefs

Programs

  • PARI
    a(n) = lift(sqrtn(3+O(13^n), 4) * sqrt(-1+O(13^n)))

Formula

a(n) = A324082(n)*A286840(n) mod 13^n = A324083(n)*A286841(n) mod 13^n.
For n > 0, a(n) = 13^n - A324084(n).
a(n)^2 == A322085(n) (mod 13^n).

A324082 One of the four successive approximations up to 13^n for 13-adic integer 3^(1/4).This is the 3 (mod 13) case (except for n = 0).

Original entry on oeis.org

0, 3, 68, 575, 13757, 156562, 4612078, 52880168, 178377202, 9967145854, 137221138330, 1240089073122, 22746013801566, 279024950148857, 2399150696294628, 2399150696294628, 104770936724476142, 3431853982640375347, 98586429095835092610, 1335595905567366417029
Offset: 0

Views

Author

Jianing Song, Sep 01 2019

Keywords

Comments

For n > 0, a(n) is the unique number k in [1, 13^n] and congruent to 3 mod 13 such that k^4 - 3 is divisible by 13^n.
For k not divisible by 13, k is a fourth power in 13-adic field if and only if k == 1, 3, 9 (mod 13). If k is a fourth power in 13-adic field, then k has exactly 4 fourth-power roots.

Examples

			The unique number k in [1, 13^2] and congruent to 3 modulo 13 such that k^4 - 3 is divisible by 13^2 is k = 68, so a(2) = 68.
The unique number k in [1, 13^3] and congruent to 3 modulo 13 such that k^4 - 3 is divisible by 13^3 is k = 575, so a(3) = 575.
		

Crossrefs

Programs

  • PARI
    a(n) = lift(sqrtn(3+O(13^n), 4))

Formula

a(n) = A324077(n)*A286841(n) mod 13^n = A324084(n)*A286840(n) mod 13^n.
For n > 0, a(n) = 13^n - A324083(n).
a(n)^2 == A322086(n) (mod 13^n).

A324083 One of the four successive approximations up to 13^n for 13-adic integer 3^(1/4).This is the 10 (mod 13) case (except for n = 0).

Original entry on oeis.org

0, 10, 101, 1622, 14804, 214731, 214731, 9868349, 637353519, 637353519, 637353519, 552071320915, 552071320915, 23850156443396, 1538225689404661, 48786742317796129, 560645672458703699, 5218561936740962586, 13868977856122300519, 126324384808079693648
Offset: 0

Views

Author

Jianing Song, Sep 01 2019

Keywords

Comments

For n > 0, a(n) is the unique number k in [1, 13^n] and congruent to 10 mod 13 such that k^4 - 3 is divisible by 13^n.
For k not divisible by 13, k is a fourth power in 13-adic field if and only if k == 1, 3, 9 (mod 13). If k is a fourth power in 13-adic field, then k has exactly 4 fourth-power roots.

Examples

			The unique number k in [1, 13^2] and congruent to 10 modulo 13 such that k^4 - 3 is divisible by 13^2 is k = 101, so a(2) = 101.
The unique number k in [1, 13^3] and congruent to 10 modulo 13 such that k^4 - 3 is divisible by 13^3 is k = 1622, so a(3) = 1622.
		

Crossrefs

Programs

  • PARI
    a(n) = lift(-sqrtn(3+O(13^n), 4))

Formula

a(n) = A324077(n)*A286840(n) mod 13^n = A324084(n)*A286841(n) mod 13^n.
For n > 0, a(n) = 13^n - A324082(n).
a(n)^2 == A322086(n) (mod 13^n).

A324084 One of the four successive approximations up to 13^n for 13-adic integer 3^(1/4).This is the 11 (mod 13) case (except for n = 0).

Original entry on oeis.org

0, 11, 141, 986, 25153, 25153, 2252911, 2252911, 504241047, 3767163931, 67394160169, 1583837570508, 5168158358582, 191552839338430, 2008803478891948, 21695685407388393, 226439257463751421, 1557272475830111103, 96711847589024828366, 96711847589024828366
Offset: 0

Views

Author

Jianing Song, Sep 01 2019

Keywords

Comments

For n > 0, a(n) is the unique number k in [1, 13^n] and congruent to 11 mod 13 such that k^4 - 3 is divisible by 13^n.
For k not divisible by 13, k is a fourth power in 13-adic field if and only if k == 1, 3, 9 (mod 13). If k is a fourth power in 13-adic field, then k has exactly 4 fourth-power roots.

Examples

			The unique number k in [1, 13^2] and congruent to 11 modulo 13 such that k^4 - 3 is divisible by 13^2 is k = 141, so a(2) = 141.
The unique number k in [1, 13^3] and congruent to 11 modulo 13 such that k^4 - 3 is divisible by 13^3 is k = 986, so a(3) = 986.
		

Crossrefs

Programs

  • PARI
    a(n) = lift(-sqrtn(3+O(13^n), 4) * sqrt(-1+O(13^n)))

Formula

a(n) = A324082(n)*A286841(n) mod 13^n = A324083(n)*A286840(n) mod 13^n.
For n > 0, a(n) = 13^n - A324077(n).
a(n)^2 == A322085(n) (mod 13^n).

A322085 One of the two successive approximations up to 13^n for 13-adic integer sqrt(3). Here the 4 (mod 13) case (except for n = 0).

Original entry on oeis.org

0, 4, 108, 1122, 18698, 361430, 1104016, 5930825, 570667478, 7912243967, 113957237697, 251815729546, 11004778093768, 104197118583692, 3132948184506222, 26757206498701956, 589802029653700283, 7909384730668678534, 85763128005100719931, 648040162764887685576
Offset: 0

Views

Author

Jianing Song, Nov 26 2018

Keywords

Comments

For n > 0, a(n) is the unique solution to x^2 == 3 (mod 13^n) in the range [0, 13^n - 1] and congruent to 4 modulo 13.
A322086 is the approximation (congruent to 9 mod 13) of another square root of 3 over the 13-adic field.

Examples

			4^2 = 16 = 1*13 + 3.
108^2 = 11664 = 69*13^2 + 3.
1122^2 = 1258884 = 573*13^3 + 3.
		

Crossrefs

Programs

  • Maple
    S:= map(t -> op([1,3],t),[padic:-evalp(RootOf(x^2-3,x),13,30)]):
    S4:= op(select(t -> t[1]=4, S)):
    seq(add(S4[i]*13^(i-1),i=1..n-1),n=1..31); # Robert Israel, Jun 13 2019
  • PARI
    a(n) = truncate(sqrt(3+O(13^n)))

Formula

For n > 0, a(n) = 13^n - A322086(n).
a(n) = Sum_{i=0..n-1} A322087(i)*13^i.
a(n) = A286840(n)*A322089(n) mod 13^n = A286841(n)*A322090(n) mod 13^n.

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
Showing 1-10 of 15 results. Next