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

A009003 Hypotenuse numbers (squares are sums of 2 nonzero squares).

Original entry on oeis.org

5, 10, 13, 15, 17, 20, 25, 26, 29, 30, 34, 35, 37, 39, 40, 41, 45, 50, 51, 52, 53, 55, 58, 60, 61, 65, 68, 70, 73, 74, 75, 78, 80, 82, 85, 87, 89, 90, 91, 95, 97, 100, 101, 102, 104, 105, 106, 109, 110, 111, 113, 115, 116, 117, 119, 120, 122, 123, 125, 130, 135, 136, 137, 140
Offset: 1

Views

Author

Keywords

Comments

Multiples of Pythagorean primes A002144 or of primitive Pythagorean triangles' hypotenuses A008846. - Lekraj Beedassy, Nov 12 2003
This is exactly the sequence of positive integers with at least one prime divisor of the form 4k + 1. Compare A072592. - John W. Layman, Mar 12 2008 and Franklin T. Adams-Watters, Apr 26 2009
Circumradius R of the triangles such that the area, the sides and R are integers. - Michel Lagneau, Mar 03 2012
The 2 squares summing to a(n)^2 cannot be equal because sqrt(2) is not rational. - Jean-Christophe Hervé, Nov 10 2013
Closed under multiplication. The primitive elements are those with exactly one prime divisor of the form 4k + 1 with multiplicity one, which are also those for which there exists a unique integer triangle = A084645. - Jean-Christophe Hervé, Nov 11 2013
a(n) are numbers whose square is the mean of two distinct nonzero squares. This creates 1-to-1 mapping between a Pythagorean triple and a "Mean" triple. If the Pythagorean triple is written, abnormally, as {j, k, h} where j^2 +(j+k)^2 = h^2, and h = a(n), then the corresponding "Mean" triple with the same h is {k, 2j, h} where (k^2 + (k+2j)^2)/2 = h^2. For example for h = 5, the Pythagorean triple is {3, 1, 5} and the Mean triple is {1, 6, 5}. - Richard R. Forberg, Mar 01 2015
Integral side lengths of rhombuses with integral diagonals p and q (therefore also with integral areas A because A = pq/2 is some multiple of 24). No such rhombuses are squares. - Rick L. Shepherd, Apr 09 2017
Conjecture: these are bases n in which exists an n-adic integer x satisfying x^5 = x, and 5 is the smallest k>1 such that x^k =x (so x^2, x^3 and x^4 are not x). Example: the 10-adic integer x = ...499879186432 (A120817) satisfies x^5 = x, and x^2, x^3, and x^4 are not x, so 10 is in this sequence. See also A120817, A210850 and A331548. - Patrick A. Thomas, Mar 01 2020
Didactic comment: When students solve a quadratic equation a*x^2 + b*x + c = 0 (a, b, c: integers) with the solution formula, they often make the mistake of calculating b^2 + 4*a*c instead of b^2 - 4*a*c (especially if a or c is negative). If the root then turns out to be an integer, they feel safe. This sequence lists the absolute values of b for which this error can happen. Reasoning: With p^2 = b^2 - 4*a*c and q^2 = b^2 + 4*a*c it follows by addition immediately that p^2 + q^2 = 2*b^2. If 4*a*c < 0, let p = x + y and q = x - y. If 4*a*c > 0, let p = x - y and q = x + y. In both cases follows that y^2 + x^2 = b^2. So every Pythagorean triple gives an absolute value of b for which this error can occur. Example: From (y, x, b) = (3, 4, 5) follows (q^2, b^2, p^2) = (1, 25, 49) or (p^2, b^2, q^2) = (1, 25, 49) with abs(4*a*c) = 24. - Felix Huber, Jul 22 2023
Conjecture: Numbers m such that the limit: Limit_{s->1} zeta(s)*Sum_{k=1..m} [k|m]*A008683(k)*(i^k)/(k^(s - 1)) exists, which is equivalent to numbers m such that abs(Sum_{k=1..m} [k|m]*A008683(k)*(i^k)) = 0. - Mats Granvik, Jul 06 2024

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 98-104.

Crossrefs

Cf. A000404 (sums of 2 squares), A004431 (sums of 2 distinct squares), A009000 (hypotenuse numbers with repetition), A072592, A004613, A187811.
Complement of A004144. Primes in this sequence give A002144. Same as A146984 (integer contraharmonic means) as sets - see Pahikkala 2010, Theorem 5.
Cf. A083025, A084645 (primitive elements), A084646, A084647, A084648, A084649, A006339.

Programs

  • Haskell
    import Data.List (findIndices)
    a009003 n = a009003_list !! (n-1)
    a009003_list = map (+ 1) $ findIndices (> 0) a005089_list
    -- Reinhard Zumkeller, Jan 07 2013
    
  • Maple
    isA009003 := proc(n)
        local p;
        for p in numtheory[factorset](n) do
            if modp(p,4) = 1 then
                return true;
            end if;
        end do:
        false;
    end proc:
    for n from 1 to 200 do
        if isA009003(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Nov 17 2014
  • Mathematica
    f[n_] := Module[{k = 1}, While[(n - k^2)^(1/2) != IntegerPart[(n - k^2)^(1/2)], k++; If[2 * k^2 >= n, k = 0; Break[]]]; k]; A009003 = {}; Do[If[f[n^2] > 0, AppendTo[A009003, n]], {n, 3, 100}]; A009003 (* Vladimir Joseph Stephan Orlovsky, Jun 15 2009 *)
    Select[Range[200], Length[PowersRepresentations[#^2, 2, 2]] > 1 &] (* Alonso del Arte, Feb 11 2014 *)
  • PARI
    is_A009003(n)=setsearch(Set(factor(n)[,1]%4),1)  \\ M. F. Hasler, May 27 2012
    
  • PARI
    list(lim)=my(v=List(),u=vectorsmall(lim\=1)); forprimestep(p=5,lim,4, forstep(n=p,lim,p, u[n]=1)); for(i=5,lim, if(u[i], listput(v,i))); u=0; Vec(v) \\ Charles R Greathouse IV, Jan 13 2022
    
  • Python
    from itertools import count, islice
    from sympy import primefactors
    def A009003_gen(): # generator of terms
        return filter(lambda n:any(map(lambda p: p % 4 == 1,primefactors(n))),count(1))
    A009003_list = list(islice(A009003_gen(),20)) # Chai Wah Wu, Jun 22 2022

Formula

A005089(a(n)) > 0. - Reinhard Zumkeller, Jan 07 2013
a(n) ~ n. - Charles R Greathouse IV, Jan 13 2022
a(n) = sqrt(n-th square in A000404), where A000404 lists the sums of two nonzero squares. - M. F. Hasler, Jun 20 2025

Extensions

Definition edited by Jean-Christophe Hervé, Nov 10 2013

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

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

A114525 Triangle of coefficients of the Lucas (w-)polynomials.

Original entry on oeis.org

2, 0, 1, 2, 0, 1, 0, 3, 0, 1, 2, 0, 4, 0, 1, 0, 5, 0, 5, 0, 1, 2, 0, 9, 0, 6, 0, 1, 0, 7, 0, 14, 0, 7, 0, 1, 2, 0, 16, 0, 20, 0, 8, 0, 1, 0, 9, 0, 30, 0, 27, 0, 9, 0, 1, 2, 0, 25, 0, 50, 0, 35, 0, 10, 0, 1, 0, 11, 0, 55, 0, 77, 0, 44, 0, 11, 0, 1, 2, 0, 36, 0, 105, 0, 112, 0, 54, 0, 12, 0, 1
Offset: 0

Views

Author

Eric W. Weisstein, Dec 06 2005

Keywords

Comments

Unsigned version of A108045.
The row reversed triangle is A162514. - Paolo Bonzini, Jun 23 2016

Examples

			2, x, 2 + x^2, 3*x + x^3, 2 + 4*x^2 + x^4, 5*x + 5*x^3 + x^5, ... give triangle
  n\k   0  1  2  3  4  5  6  7  8  9 10 ...
  0:    2
  1:    0  1
  2:    2  0  1
  3:    0  3  0  1
  4:    2  0  4  0  1
  5:    0  5  0  5  0  1
  6:    2  0  9  0  6  0  1
  7:    0  7  0 14  0  7  0  1
  8:    2  0 16  0 20  0  8  0  1
  9:    0  9  0 30  0 27  0  9  0  1
  10:   2  0 25  0 50  0 35  0 10  0  1
  n\k   0  1  2  3  4  5  6  7  8  9 10 ...
  .... reformatted by _Wolfdieter Lang_, Feb 10 2023
		

Crossrefs

Cf. A108045 (signed version).
Cf. Sequences L(n,x): A000032(x = 1), A002203 (x = 2), A006497 (x = 3), A014448 (x = 4), A087130 (x = 5), A085447 (x = 6), A086902 (x = 7), A086594 (x = 8), A087798 (x = 9), A086927 (x = 10), A001946 (x = 11), A086928 (x = 12), A088316 (x = 13), A090300 (x = 14), A090301 (x = 15), A090305 (x = 16), A090306 (x = 17), A090307 (x = 18), A090308 (x = 19), A090309 (x = 20), A090310 (x = 21), A090313 (x = 22), A090314 (x = 23), A090316 (x = 24), A087281 (x = 29), A087287 (x = 76), A089772 (x = 199).

Programs

  • Maple
    Lucas := proc(n,x)
        option remember;
        if  n=0 then
            2;
        elif n =1 then
            x ;
        else
            x*procname(n-1,x)+procname(n-2,x) ;
        end if;
    end proc:
    A114525 := proc(n,k)
        coeftayl(Lucas(n,x),x=0,k) ;
    end proc:
    seq(seq(A114525(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Aug 16 2019
  • Mathematica
    row[n_] := CoefficientList[LucasL[n, x], x];
    Table[row[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Aug 11 2018 *)

Formula

From Peter Bala, Mar 18 2015: (Start)
The Lucas polynomials L(n,x) satisfy the recurrence L(n+1,x) = x*L(n,x) + L(n-1,x) with L(0,x) = 2 and L(1,x) = x.
O.g.f.: Sum_{n >= 0} L(n,x)*t^n = (2 - x*t)/(1 - t^2 - x*t) = 2 + x*t + (x^2 + 2)*t^2 + (3*x + x^3)*t^3 + ....
L(n,x) = trace( [ x, 1; 1, 0 ]^n ).
exp( Sum_{n >= 1} L(n,x)*t^n/n ) = Sum_{n >= 0} F(n+1,x)*t^n, where F(n,x) denotes the n-th Fibonacci polynomial. (see Appendix A3 in Johnson).
exp( Sum_{n >= 1} L(n,x)*L(2*n,x)*t^n/n ) = 1/( F(1,x)*F(2*x)*F(3,x) ) * Sum_{n >= 0} F(n+1,x)*F(n+2,x)*F(n+3,x)*t^n.
exp( Sum_{n >= 1} L(3*n,x)/L(n,x)*t^n/n ) = Sum_{n >= 0} L(2*n + 1,x)*t^n.
L(n,1) = Lucas(n) = A000032(n); L(n,4) = Lucas(3*n) = A014448(n); L(n,11) = Lucas(5*n) = A001946(n); L(n,29) = Lucas(7*n) = A087281(n); L(n,76) = Lucas(9*n) = A087287(n); L(n,199) = Lucas(11*n) = A089772(n). The general result is L(n,Lucas(2*k + 1)) = Lucas((2*k + 1)*n). (End)
From Jeremy Dover, Jun 10 2016: (Start)
Read as a triangle T(n,k), n >= 0, n >= k >= 0, T(n,k) = (Binomial((n+k)/2,k) + Binomial((n+k-2)/2,k))*(1+(-1)^(n-k))/2.
T(n,k) = A046854(n-1,k-1) + A046854(n-1,k) + A046854(n-2,k) for even n+k with n+k > 0, assuming A046854(n,k) = 0 for n < 0, k < 0, k > n.
T(n,k) is the number of binary strings of length n with exactly k pairs of consecutive 0's and no pair of consecutive 1's, where the first and last bits are considered consecutive. (End)
From Peter Bala, Sep 03 2022: (Start)
L(n,x) = 2*(i)^n*T(n,-i*x/2), where i = sqrt(-1) and T(n,x) is the n-th Chebyshev polynomial of the first kind.
d/dx(L(n,x)) = n*F(n,x), where F(n,x) denotes the n-th Fibonacci polynomial.
Let P_n(x,y) = (L(n,x) - L(n,y))/(x - y). Then {P_n(x,y): n >= 1} is a fourth-order linear divisibility sequence of polynomials in the ring Z[x,y]: if m divides n in Z then P_m(x,y) divides P_n(x,y) in Z[x,y].
P_n(1,1) = A045925(n); P_n(1,4) = A273622; P_n(2,2) = A093967(n).
L(2*n,x)^2 - L(2*n-1,x)*L(2*n+1,x) = x^2 + 4 for n >= 1.
Sum_{n >= 1} L(2*n,x)/( L(2*n-1,x) * L(2*n+1,x) ) = 1/x^2 and
Sum_{n >= 1} (-1)^(n+1)/( L(2*n,x) + x^2/L(2*n,x) ) = 1/(x^2 + 4), both valid for all nonzero real x. (End)
From Peter Bala, Nov 18 2022: (Start)
L(n,x) = Sum_{k = 0..floor(n/2)} (n/(n-k))*binomial(n-k,k)*x^(n-2*k) for n >= 1.
For odd m, L(n, L(m,x)) = L(n*m, x).
For integral x, the sequence {u(n)} := {L(n,x)} satisfies the Gauss congruences: u(m*p^r) == u(m*p^(r-1)) (mod p^r) for all positive integers m and r and all primes p.
Let p be an odd prime and let 0 <= k <= p - 1. Let alpha_k = the p-adic limit_{n -> oo} L(p^n,k). Then alpha_k is a well-defined p-adic-integer and the polynomial L(p,x) - x of degree p factorizes as L(p,x) - x = Product_{k = 0..p-1} (x - alpha_k). For example, L(5,x) - x = x^5 + 5*x^3 + 4*x = x*(x - A269591)*(x - A210850)*(x - A210851)*(x - A269592) in the ring of 5-adic integers. (End)
The formula for L(n,x) given in the first line of the preceding section, with L(0, x) = 2, is rewritten L(n, x) = Sum_{k = 0..floor(n/2)} A034807(n, k)*x^(n - 2*k). See the formula by Alexander Elkins in A034807. - Wolfdieter Lang, Feb 10 2023

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

A269591 Digits of one of the two 5-adic integers sqrt(-4).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Mar 02 2016

Keywords

Comments

This is the scaled first difference sequence of A268922.
The digits of the other 5-adic integer sqrt(-4), are given in A269592. See also A268922 for the two 5-adic numbers sqrt(-4), called u and -u.
a(n) is the unique solution of the linear congruence 2*A268922(n)*a(n) + A269593(n) == 0 (mod 5), n>=1. Therefore only the values 0, 1, 2, 3 and 4 appear. See the Nagell reference given in A268922, eq. (6) on p. 86, adapted to this case. a(0) = 1 follows from the formula given below.

Examples

			a(4) = 3 because 2*261*3 + 109 = 1675 == 0 (mod 5).
a(4) = - 109*(2*261)^3 (mod 5) = -(-1)*(2*1)^3 (mod 5) = 8 (mod 5) = 3.
A268922(5) = 2136 = 1*5^0 + 2*5^1 + 0*5^2 + 2*5^3 + 3*5^4.
		

Crossrefs

Cf. A210850, A210851, A268922, A269592 (companion), A269593.

Programs

  • PARI
    a(n) = truncate(sqrt(-4+O(5^(n+1))))\5^n; \\ Michel Marcus, Mar 04 2016

Formula

a(n) = (b(n+1) - b(n))/5^n, n >= 0, with b(n) = A268922(n), n >= 0.
a(n) = -A269593(n)*(2*A268922(n))^3 (mod 5), n >= 1. Solution of the linear congruence see, e.g., Nagell, Theorem 38 pp. 77-78.
A268922(n+1) = sum(a(k)*5^k, k=0..n), n >= 0.

A286838 Digits of one of the two 13-adic integers sqrt(-1) (digits 0, 1, ... , 9, 10, 11, 12 are used instead of 0, 1, ... , 9, A, B, C).

Original entry on oeis.org

5, 5, 1, 0, 5, 5, 1, 0, 1, 8, 8, 6, 12, 6, 3, 0, 4, 7, 4, 5, 0, 5, 1, 4, 11, 7, 6, 10, 5, 5, 5, 9, 6, 10, 6, 2, 5, 0, 0, 2, 11, 7, 7, 0, 7, 5, 12, 3, 4, 2, 9, 6, 7, 2, 12, 7, 6, 1, 5, 0, 5, 3, 11, 0, 10, 12, 3, 8, 5, 6, 10, 5, 9, 6, 9, 2, 8, 5, 0, 12, 11, 0, 2, 11
Offset: 0

Views

Author

Seiichi Manyama, Aug 01 2017

Keywords

Crossrefs

Digits of one of the two p-adic integers sqrt(-1): A210850 and A210851 (p=5), this sequence and A286839 (p=13).

Programs

  • Ruby
    def A(k, m, n)
      d_ary = []
      ary = [0]
      a, mod = k, m
      (n + 1).times{|i|
        b = a % mod
        d_ary << (b - ary[-1]) / m ** i
        ary << b
        a = b ** m
        mod *= m
      }
      d_ary
    end
    def A286838(n)
      A(5, 13, n)
    end
    p A286838(100)

Extensions

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

A286839 Digits of one of the two 13-adic integers sqrt(-1) (digits 0, 1, ... , 9, 10, 11, 12 are used instead of 0, 1, ... , 9, A, B, C).

Original entry on oeis.org

8, 7, 11, 12, 7, 7, 11, 12, 11, 4, 4, 6, 0, 6, 9, 12, 8, 5, 8, 7, 12, 7, 11, 8, 1, 5, 6, 2, 7, 7, 7, 3, 6, 2, 6, 10, 7, 12, 12, 10, 1, 5, 5, 12, 5, 7, 0, 9, 8, 10, 3, 6, 5, 10, 0, 5, 6, 11, 7, 12, 7, 9, 1, 12, 2, 0, 9, 4, 7, 6, 2, 7, 3, 6, 3, 10, 4, 7, 12, 0, 1
Offset: 0

Views

Author

Seiichi Manyama, Aug 01 2017

Keywords

Crossrefs

Digits of one of the two p-adic integers sqrt(-1): A210850 and A210851 (p=5), A286838 and this sequence (p=13).

Programs

  • Ruby
    def A(k, m, n)
      d_ary = []
      ary = [0]
      a, mod = k, m
      (n + 1).times{|i|
        b = a % mod
        d_ary << (b - ary[-1]) / m ** i
        ary << b
        a = b ** m
        mod *= m
      }
      d_ary
    end
    def A286839(n)
      A(8, 13, n)
    end
    p A286839(100)

Formula

a(n) = 12 - A286838(n) for n > 0.

Extensions

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

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

A309443 Coefficients in 5-adic expansion of 4^(1/3).

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Aug 03 2019

Keywords

Crossrefs

Cf. A309444.
Digits of p-adic integers:
A269591, A269592 (5-adic, sqrt(-4));
A210850, A210851 (5-adic, sqrt(-1));
A290566 (5-adic, 2^(1/3));
A290563 (5-adic, 3^(1/3)).

Programs

  • Maple
    op([1,3], padic:-rootp(x^3-4,5,101)); # Robert Israel, Aug 04 2019
  • PARI
    Vecrev(digits(truncate((4+O(5^100))^(1/3)), 5))
  • Ruby
    require 'OpenSSL'
    def f_a(ary, a)
      (0..ary.size - 1).inject(0){|s, i| s + ary[i] * a ** i}
    end
    def df(ary)
      (1..ary.size - 1).map{|i| i * ary[i]}
    end
    def A(c_ary, k, m, n)
      x = OpenSSL::BN.new((-f_a(df(c_ary), k)).to_s).mod_inverse(m).to_i % m
      f_ary = c_ary.map{|i| x * i}
      f_ary[1] += 1
      d_ary = []
      ary = [0]
      a, mod = k, m
      (n + 1).times{|i|
        b = a % mod
        d_ary << (b - ary[-1]) / m ** i
        ary << b
        a = f_a(f_ary, b)
        mod *= m
      }
      d_ary
    end
    def A309443(n)
      A([-4, 0, 0, 1], 4, 5, n)
    end
    p A309443(100)
    
Showing 1-10 of 32 results. Next