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 32 results. Next

A210849 a(n) = (A048899(n)^2 + 1)/5^n, n >= 0.

Original entry on oeis.org

1, 2, 13, 37, 314, 365, 73, 13369, 31226, 1432954, 1346393, 10982633, 59784881, 986508685, 197301737, 12342639754, 16335212753, 165277755905, 33055551181, 12781804411945, 2556360882389, 25830314642530
Offset: 0

Views

Author

Wolfdieter Lang, Apr 28 2012

Keywords

Comments

a(n) is an integer (nonnegative) because b(n):=A048899(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) == 3 (mod 5), is b(n) = 3^(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 (10 - 1)^(5^(n-1)) + 1 and show that it is 0 (mod 5^n) term by term. The second congruence reduces to b(n) == 3^(5^(n-1)) (mod 5) which follows for n>=1 by induction. Because b(n) = 5^n - A048898(n) one could also use the result A048898(n) == 2 (mod 5) once this is proved.
See also the comment on A210848 on two relevant theorems.

Examples

			a(0) = 1/1 = 1.
a(3) = (68^2 + 1)/5^3 = 37  (b(3) = 18^5 (mod 5^3) = 68).
		

Crossrefs

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

Programs

  • Maple
    b:=proc(n) option remember: if n=0 then 0 elif n=1 then 3
    else modp(b(n-1)^5,5^n) fi end proc:
    [seq((b(n)^2+1)/5^n,n=0..29)];
  • Mathematica
    b[n_] := b[n] = Which[n == 0, 0, n == 1, 3, True, Mod[b[n-1]^5, 5^n]]; Table[(b[n]^2+1)/5^n, {n, 0, 29}] (* Jean-François Alcover, Mar 05 2014, after Maple *)

Formula

a(n) = (b(n)^2 + 1)/5^n, n>=0, with b(n) = A048899(n) given by the recurrence b(n) = b(n-1)^5 (mod 5^n), n>=2, b(0):=0, b(1)=3 (this is the analog of the Mathematica Program by Jean-François Alcover for A048898).
a(n) - A210848(n) = A048899(n) - A048898(n) (== 1 mod 5 if n>0). - Álvar Ibeas, Feb 21 2017

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

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

A268922 One of the two successive approximations up to 5^n for the 5-adic integer sqrt(-4). These are the 1 mod 5 numbers, except for n = 0.

Original entry on oeis.org

0, 1, 11, 11, 261, 2136, 2136, 64636, 220886, 1392761, 7252136, 46314636, 241627136, 974049011, 2194752136, 8298267761, 99851002136, 710202564636, 710202564636, 12154294361511, 31227780689636
Offset: 0

Views

Author

Wolfdieter Lang, Mar 02 2016

Keywords

Comments

The other approximation for the 5-adic integer sqrt(-4) with numbers 4 (mod 5) is given in A269590.
For the two approximations of the 5-adic integer sqrt(-1) see A048899 and A048898. For comments and some proofs see A210848.
For the digits of this 5-adic integer sqrt(-4), that is the scaled first differences, see A269591. This 5-adic number has the digits read from the right to the left ...32234111132111101130213043113443324032021 = u.
The companion 5-adic number -u has digits ....12210333312333343314231401331001120412424. See A269592.
The recurrence given below (for n >= 1) has been derived from the following facts (i) x^2 + 4 == 0 (mod 5) has the two distinct solutions x(1) = 1 and x(2) = 5 - x(1) = 4. This guarantees the existence of a unique solution x = x1(n) of x^2 + 4 == 0 (mod 5^n) , for n >= 2 , which satisfies also x1(n) == 1 (mod 5). See e.g., Theorem 50, p. 87 of the Nagell reference. The same is true for the solution x = x2(n) with x2(n) == 4 (mod 5^n). (ii) As a consequence of Hensel's lemma (see e.g., the Wikipedia reference under Hensel lifting) one knows that x1(n) (which is treated here) satisfies the congruence x1(n) == x1(n-1) (mod 5^(n-1)) with x1(1) = x1 = 1. (A similar statement holds for x2(n) with input x2(1) = x(2) = 4. This is used in A269590). These two facts allow one to derive a recurrence for x1(n) (and for x2(n)).

Examples

			n=2:  11^2 + 4 = 125  == 0 (mod 5^2), and 125 is the only solution from {0, 1, ..., 24} which is congruent to 1 modulo 5.
n=3:  the only solution of x1^2 + 4 == 0 (mod 5^3) with x1 from {0, ..., 124} and x1 ==  1 (mod 4) is also 11. The number 114 satisfies also the first congruence but not the second one: 114 == 2 (mod 4).
		

References

  • Trygve Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964, p. 87.

Crossrefs

Programs

  • Maple
    with(padic):D1:=op(3,op([evalp(RootOf(x^2+4),5,20)][1])): 0,seq(sum('D1[k]*5^(k-1)','k'=1..n), n=1..20);
    # alternative program - see A144837
    a := proc (n) option remember; if n = 1 then 1 else irem( a(n-1)^5 + 5*a(n-1)^3 + 5*a(n-1), 5^n) end if; end: seq(a(n), n = 1..20); # Peter Bala, Nov 14 2022
  • PARI
    a(n) = truncate(sqrt(-4+O(5^(n)))); \\ Michel Marcus, Mar 04 2016

Formula

Recurrence for n >= 1: a(n) = modp( a(n-1) + 2*(a(n-1)^2 + 4), 5^n), n >= 2, with a(1) = 1. Here modp(a, m) is used to pick the representative of the residue class a modulo m from the smallest nonnegative complete residue system {0, 1, ... , m-1}.
a(n) = 5^n - A269590(n), n >= 1.
a(n) == Lucas(5^n) (mod 5^n). - Peter Bala, Nov 10 2022

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

A210852 Approximations up to 7^n for one of the three 7-adic integers (-1)^(1/3).

Original entry on oeis.org

0, 3, 31, 325, 1354, 1354, 34968, 740862, 2387948, 25447152, 146507973, 1276408969, 9185715941, 78392151946, 272170172760, 950393245609, 10445516265495, 43678446835096, 974200502783924, 10744682090246618, 22143577275619761
Offset: 0

Views

Author

Wolfdieter Lang, May 02 2012

Keywords

Comments

The numbers are computed from the recurrence given below in the formula field. This recurrence follows from the formula a(n) = 3^(7^(n-1)) (mod 7^n), n >= 1, which satisfies a(n)^3 + 1 == 0 (mod 7^n), n >= 1. a(0) = 0 satisfies this congruence as well. The proof can be done by showing that each term in the binomial expansion of (3^(7^(n-1)))^3 +1 = (28 -1)^(7^(n-1)) + 1 has a factor 7^n.
a(n) == 3 (mod 7), n >= 1. This follows from the formula given above, and 3^(7^(n-1)) == 3 (mod 7), n >= 1 (proof by induction).
The digit t(n), n >= 0, multiplying 7^n in the 7-adic integer (-1)^(1/3) corresponding to this sequence is obtained from the (unique) solution of the linear congruence 3*a(n)^2*t(n) + b(n) == 0 (mod 7), n >= 1, with b(n):= (a(n)^3+1)/7^n = A210853(n). t(0):=3, one of the three solutions of X^3 + 1 == 0 (mod 7). For these digits see A212152. The 7-adic number is, read from right to left, ...3143214516604202226653431432053116412125443426203643 =: u.
a(n) is obtained from reading u in base 7, and adding the first n terms.
One can show directly that a(n) = 7^n + 1 - y(n), n >= 1, with y(n) = A212153(n) and z(n) = 7^n - 1 = 6*A023000(n), n >= 0.
Iff a(n+1) = a(n) then t(n) = A212152(n) = 0.
See the Nagell reference given in A210848 for theorems 50 and 52 on p. 87, and formula (6) on page 86, adapted to this case. Because X^3 + 1 = 0 (mod 7) has the three simple roots 3, 5 and 6, one has for X(n)^3 + 1 == 0 (mod 7^n) exactly three solutions for each n >= 1, which can be chosen as a(n) == 3 (mod 7), y(n) == 5 (mod 7) and z(n) == 6 (mod 7) == -1 (mod 7). The y- and z- sequences are given in A212153 and 6*A023000, respectively.
For n > 0, a(n) - 1 (== a(n)^2 (mod 7^n)) and 7^n - a(n) (== a(n)^4 (mod 7^n)) are the two primitive cubic roots of unity in Z/(7^n Z). - Álvar Ibeas, Feb 20 2017
From Jianing Song, Aug 26 2022: (Start)
a(n) is the solution to x^2 - x + 1 == 0 (mod 7^n) that is congruent to 3 modulo 7 (if n>0).
A212153(n) is the multiplicative inverse of a(n) modulo 7^n. (End)

Examples

			a(3) == 31^7 (mod 7^3) == 27512614111 (mod 343) = 325.
a(3) == 3^49 (mod 7^3) = 325.
a(3) = 31 + 6*7^2 = 325.
a(3) = 3*7^0 + 4*7^1 + 6*7^2 = 325.
a(3) = 7^3 +1 - 19 = 325.
a(5) = a(4) = 1354 because A212152(4) = 0.
		

Crossrefs

Cf. A212152 (digits of (-1)^(1/3)), A212153 (approximations of another cube root of -1), 6*A023000 (approximations of -1).
Cf. A048898, A048899 (approximations of the 5-adic integers sqrt(-1)); A319097, A319098, A319199 (approximations of the 7-adic integers 6^(1/3)).

Programs

  • Maple
    a:=proc(n) option remember: if n=0 then 0 elif n=1 then 3
    else modp(a(n-1)^7, 7^n) fi end proc: [seq(a(n),n=0..30)];
  • Mathematica
    a[n_] := a[n] = Which[n == 0, 0, n == 1, 3, True, Mod[a[n-1]^7, 7^n]]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 05 2014, after Maple *)
  • PARI
    a(n) = lift((1-sqrt(-3+O(7^n)))/2) \\ Jianing Song, Aug 26 2022

Formula

Recurrence: a(n) = a(n-1)^7 (mod 7^n), n >= 2, a(0)=0, a(1)=3.
a(n) == 3^(7^(n-1)) (mod 7^n) == 3 (mod 7), n >= 1.
a(n+1) = a(n) + A212152(n)*7^n, n >= 1.
a(n+1) = Sum_{k=0..n} A212152(k)*7^k, n >= 1.
a(n-1)^2*a(n) + 1 == 0 (mod 7^(n-1)), n >= 1 (from 3*a(n)^2* A212152(n) + A210853(n) == 0 (mod 7) and the second-to-last formula from above).
a(n) = 7^n + 1 - A212153(n), n >= 1.

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

Original entry on oeis.org

0, 5, 70, 239, 239, 143044, 1999509, 6826318, 6826318, 822557039, 85658552023, 1188526486815, 11941488851037, 291518510320809, 2108769149874327, 13920898306972194, 13920898306972194, 2675587335039691558, 63228498770709057089, 513050126578538629605
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), this sequence and A286841 (p=13), A286877 and A286878 (p=17).

Programs

  • Mathematica
    {0}~Join~Table[#&@@Select[PowerModList[-1, 1/2, 13^k], Mod[#, 13] == 5 &], {k, 20}]  (* Giorgos Kalogeropoulos, Oct 21 2022 *)
  • PARI
    a(n) = truncate(sqrt(-1+O(13^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 a286840(n):
        return A(5, 13, n)
    print(a286840(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 A286840(n)
      A(5, 13, n)
    end
    p A286840(100)
    

Formula

a(0) = 0 and a(1) = 5, a(n) = a(n-1) + 9 * (a(n-1)^2 + 1) mod 13^n for n > 1.
a(n) == L(13^n,5) (mod 13^n) == ((5 + sqrt(29))/2)^(13^n) + ((5 - sqrt(29))/2)^(13^n) (mod 13^n), where L(n,x) denotes the n-th Lucas polynomial of A114525. - Peter Bala, Nov 20 2022

A212153 Approximations up to 7^n for one of the three 7-adic integers (-1)^(1/3).

Original entry on oeis.org

0, 5, 19, 19, 1048, 15454, 82682, 82682, 3376854, 14906456, 135967277, 700917775, 4655571261, 18496858462, 406052900090, 3797168264335, 22787414304107, 188952067152112, 654213095126526, 654213095126526, 57648689021992241, 456610020510052246, 2132247612759904267
Offset: 0

Views

Author

Wolfdieter Lang, May 02 2012

Keywords

Comments

See A210852 for comments and the approximation of one of the other three 7-adic integers (-1)^(1/3), called there u.
The numbers are computed from the recurrence given below in the formula field. This recurrence follows from the formula a(n) = 5^(7^(n-1)) (mod 7^n), n>= 1, which satisfies a(n)^3 + 1 == 0 (mod 7^n), n>=1. a(0) = 0 satisfies this congruence also. The proof can be done by showing that each term in the binomial expansion of (5^(7^(n-1)))^3 + 1 = (2*3^2*7 - 1)^(7^(n-1)) + 1 has a factor 7^n.
a(n) == 5 (mod 7), n>=1. This follows from the formula given above, and 5^(7^(n-1)) == 5 (mod 7), n>=1 (proof by induction).
The digit t(n), n>=0, multiplying 7^n in the 7-adic integer (-1)^(1/3) corresponding to the present sequence is obtained from the (unique) solution of the linear congruence 3*a(n)^2*t(n) + b(n) == 0 (mod 7), n>=1, with b(n):= (a(n)^3 + 1)/7^n = A212154(n). t(0):=5. For these digits see A212155. The 7-adic number is, read from right to left,
...3452150062464440013235234613550254541223240463025 =: v.
a(n) is obtained from reading v in base 7, and adding the first n terms.
One can show directly that a(n) = 7^n + 1 - x(n), n>=1, with x(n) = A210852(n), and z(n) = 7^n - 1 = 6*A023000(n), n>=0.
Iff a(n+1) = a(n) then t(n) = A212155(n) = 0.
See the Nagell reference given in A210848 for theorems 50 and 52 on p. 87, and formula (6) on page 86, adapted to this case. Because X^3 +1 = 0 (mod 7) has the three simple roots 3, 5 and 6, one has for X(n)^3 +1 == 0 (mod 7^n) exactly three solutions for each n>=1, which can be chosen as x(n) == 3 (mod 7), a(n) == 5 (mod 7) and z(n) == 6 (mod 7) == -1 (mod 7). The x- and z- sequences are given in A210852 and 6*A023000, respectively.
For n>0, a(n) - 1 (== a(n)^2 mod 7^n) and 7^n - a(n) (== a(n)^4 mod 7^n) are the two primitive cubic roots of unity in Z/(7^n Z). - Álvar Ibeas, Feb 20 2017
From Jianing Song, Aug 26 2022: (Start)
a(n) is the solution to x^2 - x + 1 == 0 (mod 7^n) that is congruent to 5 modulo 7 (if n>0).
A210852(n) is the multiplicative inverse of a(n) modulo 7^n. (End)

Examples

			a(4) == 19^7 (mod 7^4) = 893871739 (mod 2401) = 1048.
a(4) == 5^343 (mod 7^4) = 1048.
a(4) = 19 + 3*7^3 = 1048.
a(4) = 5*7^0 + 2*7^1 + 0*7^2 + 3*7^3 = 1048.
a(4) = 7^4 + 1 - 1354 = 1048.
a(3) = a(2) = 19 because A212155(2) = 0.
		

Crossrefs

Cf. A212155 (digits of (-1)^(1/3)), A210852 (approximations of another cube root of -1), 6*A023000 (approximations of -1).
Cf. A048898, A048899 (approximations of the 5-adic integers sqrt(-1)); A319097, A319098, A319199 (approximations of the 7-adic integers 6^(1/3)).

Programs

  • Maple
    a:=proc(n) option remember: if n=0 then 0 elif n=1 then 5
    else modp(a(n-1)^7, 7^n) fi end proc:
  • Mathematica
    Join[{0}, FoldList[PowerMod[#, 7, 7^#2] &, 5, Range[2, 25]]] (* Paolo Xausa, Jan 14 2025 *)
  • PARI
    a(n) = lift((1+sqrt(-3+O(7^n)))/2) \\ Jianing Song, Aug 26 2022

Formula

Recurrence: a(n) = a(n-1)^7 (mod 7^n), n>=2, a(0):=0, a(1)=5.
a(n) == 5^(7^(n-1)) (mod 7^n) == 5 (mod 7), n>= 1.
a(n+1) = a(n) + A212155(n)*7^n, n>=1.
a(n+1) = Sum_{k=0..n} A212155(k)*7^k, n>=1.
a(n-1)^2*a(n) + 1 == 0 (mod 7^(n-1)), n>=1 (from 3*a(n)^2*A212155(n) + A212154(n) == 0 (mod 7) and the formula two lines above).
a(n) = 7^n + 1 - A210852(n), n>=1.

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