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

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

A034939 a(n) is smallest number such that a(n)^2 + 1 is divisible by 5^n.

Original entry on oeis.org

0, 2, 7, 57, 182, 1068, 1068, 32318, 110443, 280182, 3626068, 23157318, 120813568, 123327057, 1097376068, 11109655182, 49925501068, 355101282318, 355101282318, 3459595983307, 15613890344818, 110981321985443
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    b=2; n5=5; jo=Join[{0,b}, Table[n5=5*n5; b=PowerMod[b,5,n5]; b=Min[b,n5-b], {99}]] (* Zak Seidov, Nov 04 2011 *)
    Table[x/.FindInstance[Mod[x^2+1,5^n]==0,x,Integers][[1]],{n,0,25}] (* Harvey P. Dale, Jul 04 2017 *)
  • PARI
    b(n)=if(n<2,2,b(n-1)^5)%5^n; a(n)=min(b(n),5^n-b(n))
    
  • Python
    from sympy.ntheory import sqrt_mod
    def A034939(n): return int(sqrt_mod(-1,5**n)) # Chai Wah Wu, May 17 2022

Formula

a(n) = min(A048898(n), A048899(n)).

Extensions

More terms from Michael Somos

A034944 Successive approximations to 13-adic integer sqrt(-1).

Original entry on oeis.org

0, 5, 70, 239, 143044, 1999509, 6826318, 822557039, 85658552023, 1188526486815, 11941488851037, 291518510320809, 2108769149874327, 13920898306972194, 2675587335039691558, 63228498770709057089
Offset: 0

Views

Author

Keywords

References

  • K. Mahler, Introduction to p-Adic Numbers and Their Functions, Cambridge, 1973, p. 35.

Crossrefs

Programs

  • PARI
    seq(n)={my(v=vector(n), i=1, k=0); while(i<#v, k++; my(t=truncate(sqrt(-1 + O(13^k)))); if(t > v[i], i++; v[i]=t)); v} \\ Andrew Howroyd, Nov 10 2018

A051276 Nonzero coefficients in one of the 5-adic expansions of sqrt(-1).

Original entry on oeis.org

2, 1, 2, 1, 3, 4, 2, 3, 3, 2, 2, 4, 1, 3, 2, 4, 4, 3, 4, 4, 1, 2, 4, 1, 4, 1, 1, 3, 1, 4, 1, 4, 2, 1, 1, 3, 3, 2, 2, 4, 4, 2, 4, 3, 1, 2, 4, 3, 3, 3, 3, 1, 3, 1, 1, 3, 3, 4, 1, 3, 3, 3, 4, 2, 2, 2, 1, 4, 1, 1, 4, 4, 2, 1, 2, 3, 4, 4, 4, 2, 2, 1, 3, 1, 3, 2, 4, 2, 1, 4, 3, 4, 3, 1, 2, 1, 3, 3, 3, 1, 1, 3, 1, 2, 2
Offset: 0

Views

Author

Keywords

Examples

			2 + 1*5 + 2*5^2 + 1*5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + 2*5^10 + 2*5^11 + 4*5^13 + 1*5^14 + 3*5^15 + 2*5^16 + 4*5^17 + 4*5^19 + ...
		

References

  • Kurt Mahler, Introduction to p-adic numbers and their functions. Cambridge Tracts in Mathematics, 76. Cambridge University Press, Cambridge-New York, 1971. See pp. 35ff.

Crossrefs

Programs

  • Maple
    R:= select(t -> padic:-ratvaluep(t,1)=2,[padic:-rootp(x^2+1,5,200)]):
    subs(0=NULL,op([1,1,3],R)); # Robert Israel, Mar 04 2016
  • PARI
    sqrt(-1+O(5^100))

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com) and Jason Earls, Jun 15 2001
Name corrected by Robert Israel at the suggestion of Wolfdieter Lang, Mar 04 2016
Showing 1-4 of 4 results.