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

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

Original entry on oeis.org

0, 3, 18, 68, 443, 1068, 1068, 32318, 110443, 1672943, 3626068, 23157318, 120813568, 1097376068, 1097376068, 19407922943, 49925501068, 355101282318, 355101282318, 15613890344818, 15613890344818, 110981321985443, 110981321985443, 9647724486047943, 9647724486047943
Offset: 0

Views

Author

Michael Somos, Jul 26 1999

Keywords

Comments

This is the root congruent to 3 (mod 5) for n>0.
The other case with the 2 (mod 5) numbers (except for n=0) is given in A048898. - Wolfdieter Lang, Feb 19 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 2 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 4 modulo 5. (End)

Examples

			a(2) = 18 because the two roots of x^2 + 1 == 0 (mod 5^2) are 7 and 18 and 18 == 3 (mod 5). For 7 see A048898(2).
		

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

Programs

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

Formula

a(n) = 5^n - A048898(n), n>=1.
a(n) = A066601(5^n), n>=0.
0 <= a(n) < 5^n. 5^n divides a(n)^2 + 1.
From Wolfdieter Lang, Apr 28 2012: (Start)
Recurrence: a(n) = a(n-1)^5 (mod 5^n), a(1) = 3, n>=2. See the Pari program below, and the J.- F. Alcover Mathematica program for A048898.
a(n) = 3^(5^(n-1)) (mod 5^n), n>=1. Compare with the above given formula involving A066601.
a(n)*a(n-1) + 1 == 0 (mod 5^(n-1)), n>=1.
(a(n)^2 + 1)/5^n = A210849(n), n>=0.
(End)
Another recurrence: a(n) = modp(a(n-1) + 4*(a(n-1)^2 + 1), 5^n), n >= 2, a(1) = 3. 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,3) (mod 5^n), where L(n,x) denotes the n-th Lucas polynomial of A114525. - Peter Bala, Nov 20 2022

Extensions

Example corrected by Wolfdieter Lang, Apr 28 2012
Name clarified by Wolfdieter Lang, Feb 19 2016

A210850 Digits of one of the two 5-adic integers sqrt(-1).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Apr 30 2012

Keywords

Comments

See A048898 for the successive approximations to this 5-adic integer, called there u.
The digits of -u, the other 5-adic integer sqrt(-1), are given in A210851.
a(n) is the unique solution of the linear congruence 2*A048898(n)*a(n) + A210848(n) == 0 (mod 5), n>=1. Therefore only the values 0, 1, 2, 3 and 4 appear. See the Nagell reference given in A210848, eq. (6) on p. 86 adapted to this case. a(0)=2 follows from the formula given below.
If n>0, a(n) == A210848(n) (mod 5), since A048898(n) == 2 (mod 5). - Álvar Ibeas, Feb 21 2017
If a(n)=0 then A048899(n+1) and A048899(n) coincide.
a(n) + A210851(n) = 4 for n >= 1. - Robert Israel, Mar 04 2016
From Jianing Song, Sep 06 2022: (Start)
With a(0) = 1, this is the digits of one of the four 4th root of -4 in the ring of 5-adic integers, the one that is congruent to 1 modulo 5.
With a(0) = 3, this is the digits of one of the four 4th root of -4 in the ring of 5-adic integers, the one that is congruent to 3 modulo 5. (End)
This square root of -1 in the 5-adic integers is equal to the 5-adic limit of the sequence {L(5^n,2)}, where L(n,x) denotes the n-th Lucas polynomial, the n-th row polynomial of A114525. - Peter Bala, Dec 02 2022

Examples

			a(4) = 3 because 2*182*3 + 53 = 1145 == 0 (mod 5).
A048898(5) = 2057 = 2*5^0 + 1*5^1 + 2*5^2 + 1*5^3 + 3*5^4.
a(8) = 0, therefore A048898(9) = A048898(8) = Sum_{k=0..7} a(k)*5^k = 280182.
		

Crossrefs

Programs

  • Maple
    R:= select(t -> padic:-ratvaluep(t,1)=2,[padic:-rootp(x^2+1,5,10001)]):
    op([1,1,3],R); # Robert Israel, Mar 04 2016
  • Mathematica
    Table[Floor[First@Select[PowerModList[-1,1/2,5^(k+1)],Mod[#,5]==2&]/5^k],{k,0,99}] (* Giorgos Kalogeropoulos, Feb 28 2023 *)
  • PARI
    a(n) = truncate(sqrt(-1+O(5^(n+1))))\5^n; \\ Michel Marcus, Mar 05 2016

Formula

a(n) = (b(n+1) - b(n))/5^n, n >= 0, with b(n):=A048898(n) computed from its recurrence. A Maple program for b(n) is given there.
A048898(n+1) = Sum_{k=0..n} a(k)*5^k, n >= 0.

Extensions

Keyword "base" added by Jianing Song, Feb 17 2021

A210851 Digits of one of the two 5-adic integers sqrt(-1).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Apr 30 2012

Keywords

Comments

See A048899 for the successive approximations to this 5-adic integer, called -u in a comment on A048898.
The digits of u, the other 5-adic integer sqrt(-1), are given in A210850.
a(n) is the (unique) solution of the linear congruence 2*A048899(n)*a(n) + A210849(n) == 0 (mod 5), n >= 1. Therefore only the values 0, 1, 2, 3 and 4 appear. See the Nagell reference given in A210848, eq. (6) on p. 86 adapted to this case. a(0)=3 follows from the formula given below.
If n>0, a(n) == -(A210849(n)) (mod 5), since A048899(n) == 3 (mod 5). - Álvar Ibeas, Feb 21 2017
If a(n)=0 then A048899(n+1) and A048899(n) coincide.
From Jianing Song, Sep 06 2022: (Start)
With a(0) = 2, this is the digits of one of the four 4th root of -4 in the ring of 5-adic integers, the one that is congruent to 2 modulo 5.
With a(0) = 4, this is the digits of one of the four 4th root of -4 in the ring of 5-adic integers, the one that is congruent to 4 modulo 5. (End)
This square root of -1 in the 5-adic integers is equal to the 5-adic limit of the sequence {L(5^n,3)}, where L(n,x) denotes the n-th Lucas polynomial, the n-th row polynomial of A114525. - Peter Bala, Dec 02 2022

Examples

			a(3) = 3 because 2*68*3 + 37 == 0 (mod 5).
A048899(4) = 443 = 3*5^0 + 3*5^1 + 2*5^2 + 3*5^3.
a(5) = 0 because A048899(6) = A048899(5) = 3*5^0 + 3*5^1 + 2*5^2 + 3*5^3 + 1*5^4 = 1068.
		

Crossrefs

Programs

  • Maple
    R:= select(t -> padic:-ratvaluep(t,1)=3,[padic:-rootp(x^2+1,5,200)]):
    op([1,1,3],R); # Robert Israel, Mar 04 2016
  • Mathematica
    Join[{3}, MapIndexed[#/5^#2[[1]] &, Differences[FoldList[PowerMod[#, 5, 5^#2] &, 3, Range[2, 100]]]]] (* Paolo Xausa, Jan 15 2025 *)
  • PARI
    a(n) = truncate(-sqrt(-1+O(5^(n+1))))\5^n; \\ Michel Marcus, Mar 05 2016

Formula

a(n) = (b(n+1) - b(n))/5^n, n >= 0, with b(n):=A048899(n) computed from its recurrence. A Maple program for b(n) is given there.
A048899(n+1) = Sum_{k=0..n} a(k)*5^k, n >= 0.

Extensions

Keyword "base" added by Jianing Song, Feb 17 2021

A210848 a(n) = (A048898(n)^2 + 1)/5^n, n >= 0.

Original entry on oeis.org

1, 1, 2, 26, 53, 1354, 13562, 26858, 200965, 40193, 3859882, 13496122, 62298370, 12459674, 4106065226, 4044371993, 69072101242, 218014644394, 3137550252170, 627510050434, 66696011833378, 280704828874769, 2167389209973245, 433477841994649, 41870795375097221, 40277856145834642
Offset: 0

Views

Author

Wolfdieter Lang, Apr 28 2012

Keywords

Comments

a(n) is an integer (nonnegative) because b(n):=A048898(n) satisfies b(n)^2 + 1 == 0 (mod 5^n), n>=0. The solution of this congruence for n>=1, which satisfies also b(n) == 2 (mod 5), is b(n) = 2^(5^(n-1)) (mod 5^n), but this is inconvenient for computing b(n) for large n. Instead one can use the b(n) recurrence which follows immediately, and this is given in the formula field below. To prove that the given b(n) formula solves the first congruence one can analyze the binomial expansion of (5 - 1)^(5^(n-1)) + 1 and show that it is 0 (mod 5^n) term by term. The second congruence reduces to b(n) == 2^(5^(n-1)) (mod 5) which follows for n>=1 by induction. Because b(n) = 5^n - A048899(n) one could also use the result A048899(n) == 3 (mod 5), once this has been proved.
The fact that X^2 + 1 == 0 (mod 5^n) has precisely two solutions for each n>=1, called x(n) and y(n), follows from the fact that X^2 + 1 == 0 (mod 5) has the two simple roots x(1) = 2 and y(1) = 3, and a theorem, given, e.g., in the Nagell reference as Theorem 50 on p. 87. From that same theorem, it also follows that one can choose all x(n) == 2 (mod 5) and all y(n) == 3 (mod 5).

Examples

			a(0) = 1/1 = 1.
a(3) = (57^2 + 1)/5^3 = 26 (b(3) = 7^5 (mod 5^3) = 57).
		

References

  • T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964.

Crossrefs

Cf. A048898, A048899, A210849 (companion sequence).

Programs

  • Maple
    b:=proc(n) option remember: if n=0 then 0 elif n=1 then 2
    else modp(b(n-1)^5,5^n) fi: end proc:
    [seq((b(n)^2+1)/5^n,n=0..29)];
  • Mathematica
    Join[{1}, MapIndexed[(#^2 + 1)/5^#2[[1]] &, FoldList[PowerMod[#, 5, 5^#2] &, 2, Range[2, 25]]]] (* Paolo Xausa, Jan 14 2025 *)

Formula

a(n) = (A048898(n)^2 + 1)/5^n.

A210853 a(n) = (A210852(n)^3 + 1)/7^n, n >= 0.

Original entry on oeis.org

1, 4, 608, 100082, 1033865, 147695, 363432817, 493771113103, 2362056468993, 408352474516087, 11132773648769182, 1051698129414636470, 55996715400581424222, 4972138747809482684591, 29726859239716779753649, 180817068189496094994710, 34294232575354274959952776, 358207669631705219617812791
Offset: 0

Views

Author

Wolfdieter Lang, May 02 2012

Keywords

Comments

a(n) is an integer because A210852(n) is one of the three solutions of X(n)^3 + 1 == 0 (mod 7^n), namely the one satisfying also X(n) == 3 (mod 7).
See the comments on A210852, and the Nagell reference given in A210848.

Examples

			a(0) = 1/1 = 1.
a(3) = (325^3 + 1)/7^3 = 34328126/343  = 100082, (b(3) = 31^7 (mod 7^3) = 325).
		

Crossrefs

Cf. A210848, A210849 (the p=5 case).

Programs

  • Mathematica
    Join[{1}, MapIndexed[(#^3 + 1)/7^#2[[1]] &, FoldList[PowerMod[#, 7, 7^#2] &, 3, Range[2, 20]]]] (* Paolo Xausa, Jan 14 2025 *)

Formula

a(n) = (b(n)^3 + 1)/7^n, n>=0, with b(n):=A210852(n) given by a recurrence. See also a Maple program for b(n) there.

A212154 a(n) = (A212153(n)^3 + 1)/7^n, n >= 0.

Original entry on oeis.org

1, 18, 140, 20, 479393, 219600095, 4804461081, 686351583, 6679631931865, 82080661415031, 8898622841908566, 174149720118385232, 7290250572352382182, 65315972853762054047, 98713213404986046050649, 11532114009920222592500432, 356054521382275298405890644, 28999349909865958163356878647
Offset: 0

Views

Author

Wolfdieter Lang, May 02 2012

Keywords

Comments

a(n) is an integer because A212153(n) is one of the three solutions of X(n)^3+1 == 0 (mod 7^n), namely the one satisfying also X(n) == 5 (mod 7).
See the comments on A210853, and the Nagell reference given in A210848.

Examples

			a(0) = 1/1 = 1.
a(3) = (19^3 + 1)/7^3 = 6860/343  = 20, (b(3) = 19^7 (mod 7^3) = 19).
		

Crossrefs

Cf. A210848, A210849 (the p=5 case), A210853, A212153, A212156.

Programs

  • Mathematica
    Join[{1}, MapIndexed[(#^3 + 1)/7^#2[[1]] &, FoldList[PowerMod[#, 7, 7^#2] &, 5, Range[2, 20]]]] (* Paolo Xausa, Jan 14 2025 *)

Formula

a(n) = (A212153(n)^3 + 1)/7^n.

A212156 a(n) = ((6*A023000(n))^3 + 1)/7^n, n >= 0.

Original entry on oeis.org

1, 31, 2257, 116623, 5757601, 282424831, 13840934257, 678220602223, 33232913275201, 1628413476849631, 79792265450186257, 3909821042651007823, 191581231339042552801, 9387480337357087274431, 459986536542705291758257
Offset: 0

Views

Author

Wolfdieter Lang, May 02 2012

Keywords

Comments

a(n) is an integer because 6*A023000(n) is one of three solution of X(n)^3+1 == 0 (mod 7^n), namely the one satisfying also X(n) == 6 (mod 7) == -1 (mod 7).
See the comments on A210852, and the Nagell reference given in A210848.

Examples

			a(0) = 1/1 = 1.
a(3) = ((6*57)^3 + 1)/7^3 = 40001689/343  = 116623,  (b(3) = 48^7 (mod 7^3) = 342 = 6*57).
		

Crossrefs

Cf. A210848, A210849 (the p=5 case). A210853, A212154.

Formula

a(n) = (b(n)^3+1)/7^n, n>=0, with b(n):=6*A023000(n) given by a recurrence obtained from the one of A023000. There also programs for b(n)/6 are given.
Showing 1-7 of 7 results.