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

A271226 a(n) = (A271222(n)^2 + 2)/3^n, n >= 0.

Original entry on oeis.org

2, 2, 3, 1, 43, 201, 67, 1289, 2278, 14662, 53782, 171798, 57266, 312537, 104179, 7353209, 14081926, 94917254, 148495259, 338541478, 2498895558, 832965186, 277655062, 45869694854, 90480235883, 230874654662
Offset: 0

Views

Author

Wolfdieter Lang, Apr 05 2016

Keywords

Comments

a(n) is an integer because b(n) = A271222(n) satisfies b(n)^2 + 2 == 0 (mod 3^n), n >= 0.
See A268924 for details, links and references.

Examples

			a(0) = (0^2 + 2)/1 = 2.
a(4) = (59^2 + 2)/3^4 = 43.
		

Crossrefs

Cf. A268924, A271222, A271224, A271225 (companion sequence).

Programs

  • PARI
    b(n) = if (n, 3^n - truncate(sqrt(-2+O(3^(n)))), 0);
    a(n) = (b(n)^2 + 2)/3^n; \\ Michel Marcus, Apr 09 2016

Formula

a(n) = (b(n)^2 + 2)/3^n, n >= 0, with b(n) = A271222(n).

A002203 Companion Pell numbers: a(n) = 2*a(n-1) + a(n-2), a(0) = a(1) = 2.

Original entry on oeis.org

2, 2, 6, 14, 34, 82, 198, 478, 1154, 2786, 6726, 16238, 39202, 94642, 228486, 551614, 1331714, 3215042, 7761798, 18738638, 45239074, 109216786, 263672646, 636562078, 1536796802, 3710155682, 8957108166, 21624372014, 52205852194, 126036076402, 304278004998
Offset: 0

Views

Author

Keywords

Comments

Also the number of matchings (independent edge sets) of the n-sunlet graph. - Eric W. Weisstein, Mar 09 2016
Apart from first term, same as A099425. - Peter Shor, May 12 2005
The signed sequence 2, -2, 6, -14, 34, -82, 198, -478, 1154, -2786, ... is the Lucas V(-2,-1) sequence. - R. J. Mathar, Jan 08 2013
Also named "Pell-Lucas numbers", apparently by Hoggatt and Alexanderson (1976), after the English mathematician John Pell (1611-1685) and the French mathematician Édouard Lucas (1842-1891). - Amiram Eldar, Oct 02 2023

References

  • Paul Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 76.
  • M. R. Bacon and C. K. Cook, Some properties of Oresme numbers and convolutions ..., Fib. Q., 62:3 (2024), 233-240.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 43.
  • Paulo Ribenboim, My Numbers, My Friends: Popular Lectures on Number Theory, Springer-Verlag, NY, 2000, p. 3.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 46, 61.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001333 (half), A302946 (squared).
Bisections are A003499 and A077444.

Programs

  • Haskell
    a002203 n = a002203_list !! n
    a002203_list =
       2 : 2 : zipWith (+) (map (* 2) $ tail a002203_list) a002203_list
    -- Reinhard Zumkeller, Oct 03 2011
    
  • Magma
    I:=[2,2]; [n le 2 select I[n] else 2*Self(n-1)+Self(n-2): n in [1..35]]; // Vincenzo Librandi, Aug 15 2015
    
  • Maple
    A002203 := proc(n)
        option remember;
        if n <= 1 then
            2;
        else
            2*procname(n-1)+procname(n-2) ;
        end if;
    end proc: # R. J. Mathar, May 11 2013
    # second Maple program:
    a:= n-> (<<0|1>, <1|2>>^n. <<2, 2>>)[1, 1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 26 2018
    a := n -> 2*I^n*ChebyshevT(n, -I):
    seq(simplify(a(n)), n = 0..30);  # Peter Luschny, Dec 03 2023
  • Mathematica
    Table[LucasL[n, 2], {n, 0, 30}] (* Zerinvary Lajos, Jul 09 2009 *)
    LinearRecurrence[{2, 1}, {2, 2}, 50] (* Vincenzo Librandi, Aug 15 2015 *)
    Table[(1 - Sqrt[2])^n + (1 + Sqrt[2])^n, {n, 0, 20}] // Expand (* Eric W. Weisstein, Oct 03 2017 *)
    LucasL[Range[0, 20], 2] (* Eric W. Weisstein, Oct 03 2017 *)
    CoefficientList[Series[(2 (1 - x))/(1 - 2 x - x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Oct 03 2017 *)
  • PARI
    first(m)=my(v=vector(m));v[1]=2;v[2]=2;for(i=3,m,v[i]=2*v[i-1]+v[i-2]);v; \\ Anders Hellström, Aug 15 2015
    
  • PARI
    a(n) = my(w=quadgen(8)); (1+w)^n + (1-w)^n; \\ Michel Marcus, Jun 17 2021
  • Sage
    [lucas_number2(n,2,-1) for n in range(0, 29)] # Zerinvary Lajos, Apr 30 2009
    

Formula

a(n) = 2 * A001333(n).
a(n) = A100227(n) + 1.
O.g.f.: (2 - 2*x)/(1 - 2*x - x^2). - Simon Plouffe in his 1992 dissertation
a(n) = (1 + sqrt(2))^n + (1 - sqrt(2))^n. - Mario Catalani (mario.catalani(AT)unito.it), Mar 17 2003
a(n) = A000129(2*n)/A000129(n), n > 0. - Paul Barry, Feb 06 2004
From Miklos Kristof, Mar 19 2007: (Start)
Given F(n) = A000129(n), the Pell numbers, and L(n) = a(n), then:
L(n+m) + (-1)^m*L(n-m) = L(n)*L(m).
L(n+m) - (-1)^m*L(n-m) = 8*F(n)*F(m).
L(n+m+k) + (-1)^k*L(n+m-k) + (-1)^m*(L(n-m+k) + (-1)^k*L(n-m-k)) = L(n)*L(m)*L(k).
L(n+m+k) - (-1)^k*L(n+m-k) + (-1)^m*(L(n-m+k) - (-1)^k*L(n-m-k)) = 8*F(n)*L(m)*F(k).
L(n+m+k) + (-1)^k*L(n+m-k) - (-1)^m*(L(n-m+k) + (-1)^k*L(n-m-k)) = 8*F(n)*F(m)*L(k).
L(n+m+k) - (-1)^k*L(n+m-k) - (-1)^m*(L(n-m+k) - (-1)^k*L(n-m-k)) = 8*L(n)*F(m)*F(k).
(End)
a(n) = 2*(A000129(n+1) - A000129(n)). - R. J. Mathar, Nov 16 2007
G.f.: G(0), where G(k) = 1 + 1/(1 - x*(2*k - 1)/(x*(2*k + 1) - 1/G(k + 1))); (continued fraction). - Sergei N. Gladkovskii, Jun 19 2013
a(n) = [x^n] ( (1 + 2*x + sqrt(1 + 4*x + 8*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015
From Kai Wang, Jan 14 2020: (Start)
A000129(m - n) = (-1)^n * (A000129(m) * a(n) - a(m) * A000129(n))/2.
A000129(m + n) = (A000129(m) * a(n) + a(m)*A000129(n))/2.
a(n)^2 - a(n + 1) * a(n - 1) = (-1)^(n) * 8.
a(n)^2 - a(n + r) * a(n - r) = (-1)^(n - r - 1) * 8 * A000129(r)^2.
a(m) * a(n + 1) - a(m + 1) * a(n) = (-1)^(n - 1) * 8 * A000129(m - n).
a(m - n) = (-1)^(n) * (a(m) * a(n) - 8 * A000129(m) * A000129(n))/2.
a(m + n) = (a(m) * a(n) + 8 * A000129(m) * A000129(n))/2.
(End)
E.g.f.: 2*exp(x)*cosh(sqrt(2)*x). - Stefano Spezia, Jan 15 2020
a(n) = A000129(n+1) + A000129(n-1) for n>0 with a(0)=2. - Rigoberto Florez, Jul 12 2020
a(n) = (-1)^n * (a(n)^3 - a(3*n))/3. - Greg Dresden, Jun 16 2021
a(n) = (a(n+2) + a(n-2))/6 for n >= 2. - Greg Dresden, Jun 23 2021
From Greg Dresden and Tongjia Rao, Sep 09 2021: (Start)
a(3n+2)/a(3n-1) = [14, ..., 14, -3] with (n+1) 14's.
a(3n+3)/a( 3n ) = [14, ..., 14, 7] with n 14's.
a(3n+4)/a(3n+1) = [14, ..., 14, 17] with n 14's. (End)
From Peter Bala, Nov 16 2022: (Start)
a(n) = trace([2, 1; 1, 0]^n) for n >= 1.
The Gauss congruences hold: a(n*p^k) == a(n*p^(k-1)) (mod p^k) for all positive integers n and k and all primes p.
a(3^n) == A271222(n) (mod 3^n). (End)
Sum_{n>=1} arctan(2/a(n))*arctan(2/a(n+1)) = Pi^2/32 (A244854) (Ohtsuka, 2019). - Amiram Eldar, Feb 11 2024
From Peter Bala, Jul 09 2025: (Start)
The following series telescope (Cf. A000032):
For k >= 1, Sum_{n >= 1} (-1)^((k+1)*(n+1)) * a(2*n*k)/(a((2*n-1)*k)*a((2*n+1)*k)) = 1/a(k)^2.
For positive even k, Sum_{n >= 1} 1/(a(k*n) - (a(k) + 2)/a(k*n)) = 1/(a(k) - 2) and
Sum_{n >= 1} (-1)^(n+1)/(a(k*n) + (a(k) - 2)/a(k*n)) = 1/(a(k) + 2).
For positive odd k, Sum_{n >= 1} 1/(a(k*n) - (-1)^n*(a(2*k) + 2)/a(k*n)) = (a(k) + 2)/(2*(a(2*k) - 2)) and
Sum_{n >= 1} (-1)^(n+1)/(a(k*n) - (-1)^n*(a(2*k) + 2)/a(k*n)) = (a(k) - 2)/(2*(a(2*k) - 2)). (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Dec 03 2001

A006266 A continued cotangent.

Original entry on oeis.org

2, 14, 2786, 21624372014, 10111847525912679844192131854786, 1033930953043290626825587838528711318150300040875029341893199068078185510802565166824630504014
Offset: 0

Views

Author

Keywords

Comments

The next (6th) term is 280 digits long. - M. F. Hasler, Oct 06 2014

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Evaluate(DicksonFirst(3^n, -1), 2): n in [0..7]]; // G. C. Greubel, Mar 25 2022
    
  • Maple
    a := proc(n) option remember; if n = 1 then 14 else a(n-1)^3 + 3*a(n-1) end if; end: seq(a(n), n = 1..5); # Peter Bala Nov 15 2022
  • Mathematica
    Table[Round[(1+Sqrt[2])^(3^n)],{n,0,10}] (* Artur Jasinski, Sep 24 2008 *)
    LucasL[3^Range[0, 7], 2] (* G. C. Greubel, Mar 25 2022 *)
  • PARI
    a(n,s=2)=for(i=2,n,s*=(s^2+3));s \\ M. F. Hasler, Oct 06 2014
    
  • Sage
    [lucas_number2(3^n,2,-1) for n in (0..7)] # G. C. Greubel, Mar 25 2022

Formula

From Artur Jasinski, Sep 24 2008: (Start)
a(n+1) = a(n)^3 + 3*a(n) with a(0) = 2.
a(n) = round((1+sqrt(2))^(3^n)). [Corrected by M. F. Hasler, Oct 06 2014] (End)
From Peter Bala, Nov 15 2022: (Start)
a(n) = A002203(3^n).
a(n) = L(3^n,2), where L(n,x) denotes the n-th Lucas polynomial of A114525.
a(n) == 2 (mod 3).
a(n+1) == a(n) (mod 3^(n+1)) for n >= 1 (a particular case of the Gauss congruences for the companion Pell numbers).
The smallest positive residue of a(n) mod(3^n) = A271222(n).
In the ring of 3-adic integers the limit_{n -> oo} a(n) exists and is equal to A271224. Cf. A006267. (End)

Extensions

Edited by M. F. Hasler, Oct 06 2014
Offset corrected by G. C. Greubel, Mar 25 2022

A268924 One of the two successive approximations up to 3^n for the 3-adic integer sqrt(-2). These are the numbers congruent to 1 mod 3 (except for n = 0).

Original entry on oeis.org

0, 1, 4, 22, 22, 22, 508, 508, 2695, 2695, 2695, 2695, 356989, 888430, 4077076, 4077076, 18425983, 18425983, 147566146, 534986635, 534986635, 7508555437, 28429261843, 28429261843, 122572440670, 405001977151
Offset: 0

Views

Author

Wolfdieter Lang, Apr 05 2016

Keywords

Comments

The other approximation for the 3-adic integer sqrt(-2) with numbers 2 (mod 3) is given in A271222.
For the digits of this 3-adic integer sqrt(-2), that is the scaled first differences, see A271223. This 3-adic number has the digits read from the right to the left ...2202101200022211102201101021200010200211 = u.
The companion 3-adic number has digits ...20020121022200011120021121201022212022012 = -u. See A271224.
For details see the W. Lang link ``Note on a Recurrence or Approximation Sequences of p-adic Square Roots'' given under A268922, also for the Nagell reference and Hensel lifting. Here p = 3, b = 2, x_1 = 1 and z_1 = 1.

Examples

			n=2: 4^2 + 2 = 18 == 0 (mod 3^2), and 4 is the only solution from {0, 1, ..., 8} which is congruent to 1 modulo 3.
n=3: the only solution of  X^2 + 2 == 0 (mod 3^3) with X from {0, ..., 26} and X == 1 (mod 3) is 22. The number 5 = A271222(3)  also satisfies the first congruence but not the second one: 5  == 2 (mod 3).
n=4: the only solution of X^2 + 2 == 0 (mod 3^4) with X from {0, ..., 80} and X == 1 (mod 3) is also 22. The number 59 = A271222(4) also satisfies the first congruence but not the second one: 59  == 2 (mod 3).
		

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+2),3,20)][1])): 0,seq(sum('D1[k]*3^(k-1)','k'=1..n), n=1..20);
    # alternative program based on the Lucas numbers L(3^n) = A006267(n)
    a := proc(n) option remember; if n = 1 then 1 else irem(a(n-1)^3 + 3*a(n-1), 3^n) end if; end: seq(a(n), n = 1..22); # Peter Bala, Nov 15 2022
  • PARI
    a(n) = truncate(sqrt(-2+O(3^(n)))); \\ Michel Marcus, Apr 09 2016
    
  • Python
    def a268924(n):
        ary=[0]
        a, mod = 1, 3
        for i in range(n):
              b=a%mod
              ary.append(b)
              a=b**2 + b + 2
              mod*=3
        return ary
    print(a268924(100)) # Indranil Ghosh, Aug 04 2017, after Ruby
  • Ruby
    def A268924(n)
      ary = [0]
      a, mod = 1, 3
      n.times{
        b = a % mod
        ary << b
        a = b * b + b + 2
        mod *= 3
      }
      ary
    end
    p A268924(100) # Seiichi Manyama, Aug 03 2017
    

Formula

a(n)^2 + 2 == 0 (mod 3^n), and a(n) == 1 (mod 3). Representatives of the complete residue system {0, 1, ..., 3^n-1} are taken.
Recurrence for n >= 1: a(n) = modp(a(n-1) + a(n-1)^2 + 2, 3^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) = 3^n - A271222(n), n >= 1.
a(n) == Lucas(3^n) (mod 3^n). - Peter Bala, Nov 10 2022

A271224 Digits of one of the two 3-adic integers sqrt(-2). Here the sequence with first digit 2.

Original entry on oeis.org

2, 1, 0, 2, 2, 0, 2, 1, 2, 2, 2, 0, 1, 0, 2, 1, 2, 1, 1, 2, 0, 0, 2, 1, 1, 1, 0, 0, 0, 2, 2, 2, 0, 1, 2, 1, 0, 2, 0, 0, 2, 0, 2, 1, 0, 2, 1, 0, 0, 0, 1, 2, 0, 2, 1, 0, 2, 0, 2, 2, 1
Offset: 0

Views

Author

Wolfdieter Lang, Apr 05 2016

Keywords

Comments

This is the scaled first difference sequence of A271222. See the formula.
The digits of the other 3-adic integer sqrt(-2), are given in A271223. See also a comment on A268924 for the two 3-adic numbers sqrt(-2), called there u and -u.
a(n) is the unique solution of the linear congruence 2*A271222(n)*a(n) + A271226(n) == 0 (mod 3), n>=1. Therefore only the values 0, 1, and 2 appear. See the Nagell reference given in A268922, eq. (6) on p. 86, adapted to this case.
a(0) = 2 follows from the formula given below.
For details see the Wolfdieter Lang link under A268992.
The first k digits in the base 3 representation of A002203(3^k) = A006266(k) give the first k terms of the sequence. - Peter Bala, Nov 26 2022

Examples

			a(4) = 2 because 2*59*2 + 43 = 279 == 0 (mod 3).
a(4) = - 43*(2*59) (mod 3) = -1*(2*(-1)) (mod 3) = 2.
A271222(5) = 221  = 2*3^0 + 1*3^1 + 0*3^2 + 2*3^3 + 2*3^4.
		

References

  • Trygve Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964, pp. 86 and 77-78.

Crossrefs

Cf. A268924, A268992, A271222, A271226, A271223 (companion).

Programs

  • PARI
    a(n) = truncate(-sqrt(-2+O(3^(n+1))))\3^n; \\ Michel Marcus, Apr 09 2016

Formula

a(n) = (b(n+1) - b(n))/3^n, n >= 0, with b(n) = A271222(n), n >= 0.
a(n) = - A271226(n)*2*A271222(n) (mod 3), n >= 1. Solution of the linear congruence given above in a comment. See, e.g., Nagell, Theorem 38 pp. 77-78.
A271222(n+1) = sum(a(k)*3^k, k=0..n), n >= 0.

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

A318961 One of the two successive approximations up to 2^n for 2-adic integer sqrt(-7). This is the 3 (mod 4) case.

Original entry on oeis.org

3, 3, 11, 11, 11, 75, 75, 331, 843, 1867, 3915, 8011, 16203, 16203, 16203, 81739, 212811, 474955, 474955, 474955, 2572107, 6766411, 6766411, 23543627, 57098059, 57098059, 57098059, 57098059, 593968971, 1667710795, 1667710795, 1667710795, 1667710795, 18847579979
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 3 (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 3 modulo 4 such that k^2 + 7 is divisible by 8 is 3, so a(2) = 3.
a(2)^2 + 7 = 16 which is divisible by 16, so a(3) = a(2) = 3.
a(3)^2 + 7 = 16 which is not divisible by 32, so a(4) = a(3) + 2^3 = 11.
a(4)^2 + 7 = 128 which is divisible by 64, so a(5) = a(4) = 11.
a(5)^2 + 7 = 128 which is divisible by 128, so a(6) = a(5) = 11.
...
		

Crossrefs

Cf. A318963.
Expansions of p-adic integers:
A318960, this sequence (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) = if(n==2, 3, truncate(sqrt(-7+O(2^(n+1)))))

Formula

a(2) = 3; 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 - A318960(n).
a(n) = Sum_{i=0..n-1} A318963(i)*2^i.

Extensions

Offset corrected by Jianing Song, Aug 28 2019

A309477 One of the two successive approximations up to 3^n for the 3-adic integer sqrt(-1/2).

Original entry on oeis.org

0, 2, 2, 11, 11, 11, 254, 254, 4628, 11189, 30872, 89921, 444215, 444215, 2038538, 2038538, 30736352, 73783073, 73783073, 848624051, 2010885518, 8984454320, 29905160726, 61286220335, 61286220335, 626145293297, 626145293297, 3168011121626, 10793608606613, 33670401061574
Offset: 0

Views

Author

Seiichi Manyama, Aug 04 2019

Keywords

Examples

			a(1) = (  2)_3 = 2,
a(2) = (  2)_3 = 2,
a(3) = (102)_3 = 11,
a(4) = (102)_3 = 11.
		

Crossrefs

Programs

  • PARI
    {a(n) = if(n, 3^n-truncate(sqrt(-1/2+O(3^n))), 0)}

Formula

a(n) = 3^n - A309476(n) for n > 0.
Showing 1-8 of 8 results.