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

A005246 a(n) = (1 + a(n-1)*a(n-2))/a(n-3), a(0) = a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 7, 11, 26, 41, 97, 153, 362, 571, 1351, 2131, 5042, 7953, 18817, 29681, 70226, 110771, 262087, 413403, 978122, 1542841, 3650401, 5757961, 13623482, 21489003, 50843527, 80198051, 189750626, 299303201, 708158977, 1117014753
Offset: 0

Views

Author

Keywords

Comments

For n >= 4 we have the linear recurrence a(n) = 4*a(n-2) - a(n-4). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 04 2001
Integer solutions to the equation floor(sqrt(3)*x^2) = x*floor(sqrt(3)*x). - Benoit Cloitre, Mar 18 2004
For n > 2, a(n) is the smallest integer > a(n-1) such that sqrt(3)*a(n) is closer to and greater than an integer than sqrt(3)*a(n-1). I.e., a(n) is the smallest integer > a(n-1) such that frac(sqrt(3)*a(n)) < frac(sqrt(3)*a(n-1)). - Benoit Cloitre, Jan 20 2003
The lower principal and intermediate convergents to 3^(1/2), beginning with 1/1, 3/2, 5/3, 12/7, 19/11, form a strictly increasing sequence; essentially, numerators=A143643 and denominators=A005246. - Clark Kimberling, Aug 27 2008
This sequence is a particular case of the following situation: a(0)=1, a(1)=a, a(2)=b with the recurrence relation a(n+3)=(a(n+2)*a(n+1)+q)/a(n) where q is given in Z to have Q=(a*b^2+q*b+a+q)/(a*b) itself in Z. The g.f. is f: f(z)=(1+a*z+(b-Q)*z^2+(a*b+q-a*Q)*z^3)/(1-Q*z^2+z^4); so we have the linear recurrence: a(n+4)=Q*a(n+2)-a(n). The general form of a(n) is given by: a(2*m) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (b-Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p) and a(2*m+1) = a*Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (a*b+q-a*Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p). - Richard Choulet, Feb 24 2010
a(n) for n > 1 are the integer square roots of (floor(m^2/3)+1), where the values of m are given by A143643. Also see A082630. - Richard R. Forberg, Nov 14 2013
The a(n) = (1 + a(n-1)*a(n-2))/a(n-3) recursion has the Laurent property. If a(0), a(1), a(2) are variables, then a(n) is a Laurent polynomial (a rational function with a monomial denominator). - Michael Somos, Feb 27 2019

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 3*x^4 + 7*x^5 + 11*x^6 + 26*x^7 + 41*x^8 + ...
From _Richard Choulet_, Feb 24 2010: (Start)
a(4) = 4^2 - 4^0 - 3*4^1 = 3.
a(7) = 4^3 - 4*binomial(2,1) - 2*(4^2-1) = 26. (End)
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections are A001835 and A001075.
Cf. A101265. Row sums of A211956.
Cf. A001353.

Programs

  • Haskell
    a005246 n = a005246_list !! n
    a005246_list = 1 : 1 : 1 : map (+ 1) (zipWith div
       (zipWith (*) (drop 2 a005246_list) (tail a005246_list)) a005246_list)
    -- Reinhard Zumkeller, Mar 07 2012
  • Maple
    A005246:=-(-1-z+2*z**2+z**3)/(1-4*z**2+z**4); # Conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence except for one of the leading 1's.
    for q from 1 to 10 do :a:=1:b:=1:Q:=(a*b^2+q*b+a+q)/(a*b): for m from 0 to 15 do U(m):=sum((-1)^p*binomial(m-p,p)*Q^(m-2*p),p=0..floor(m/2))+(b-Q)*sum((-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p),p=0..floor((m-1)/2)):od: for m from 0 to 15 do V(m):=a*sum((-1)^p*binomial(m-p,p)*Q^(m-2*p),p=0..floor(m/2))+(a*b+q-a*Q)*sum((-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p),p=0..floor((m-1)/2)):od:for m from 0 to 15 do W(2*m):=U(m):od:for m from 0 to 14 do W(2*m+1):=V(m):od:seq(W(m),m=0..30):od; # Richard Choulet, Feb 24 2010
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==a[2]==1,a[n]==(1+a[n-1]a[n-2])/a[n-3]},a,{n,40}] (* Harvey P. Dale, May 28 2013 *)
    a[n_] := Cosh[(n-1)*ArcSinh[1/Sqrt[2]]]*If[EvenQ[n], Sqrt[2/3], 1]; Table[a[n] // FunctionExpand, {n, 0, 34}] (* Jean-François Alcover, Dec 10 2014, after Peter Bala *)
    a[ n_] := With[{m = If[ n < 0, 2 - n, n]}, SeriesCoefficient[ (1 + x - 3 x^2 - 2 x^3) / (1 - 4 x^2 + x^4), {x, 0, m}]]; (* Michael Somos, Feb 10 2017 *)
  • PARI
    {a(n) = if( n<0, n = 2 - n); polcoeff((1 + x - 3*x^2 - 2*x^3) / (1 - 4*x^2 + x^4) + x * O(x^n), n)}; /* Michael Somos, Nov 15 2006 */
    
  • PARI
    {a(n) = real( (2 + quadgen(12))^(n\2) * if( n%2, 1, 1 - 1 / quadgen(12)) )}; /* Michael Somos, May 24 2012 */
    

Formula

G.f.: (1 + x - 3*x^2 - 2*x^3)/(1 - 4*x^2 + x^4).
Limit_{n->oo} a(2n+1)/a(2n) = (3+sqrt(3))/3 = 1.5773502...; lim_{n->oo} a(2n)/a(2n-1) = (3+sqrt(3))/2 = 2.3660254.... - Benoit Cloitre, Aug 07 2002
A101265(n) = a(n)*a(n+1). - Franklin T. Adams-Watters, Apr 24 2006
a(n) = a(2-n) for all n in Z. - Michael Somos, Nov 15 2006
a(2*n + 1) = A001075(n). a(2*n) = A001835(n). a(2*n + 1) - a(2*n) = a(2*n + 2) - a(2*n + 1) = A001353(n). - Michael Somos, May 24 2012
For n > 2: a(n) = a(n-1) + Sum_{k=1..floor((n-1)/2)} a(2*k). - Reinhard Zumkeller, Dec 16 2007
From Richard Choulet, Feb 24 2010: (Start)
a(2*m) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*4^(m-2*p) - 3*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*4^(m-1-2*p).
a(2*m+1) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*4^(m-2*p) - 2*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*4^(m-1-2*p). (End)
From Tim Monahan, Jul 01 2011: (Start)
Closed form without extra leading 1: ((sqrt(6)+3)*(sqrt(2+sqrt(3))^n+(sqrt(2-sqrt(3))^n))+(3-sqrt(6))*((-sqrt(2+sqrt(3)))^n+(-sqrt(2-sqrt(3)))^n))/12.
Closed form with extra leading 1: ((6+3*sqrt(6)-2*sqrt(3)-3*sqrt(2))*(sqrt(2+sqrt(3))^n)+(6+3*sqrt(6)+2*sqrt(3)+3*sqrt(2))*(sqrt(2-sqrt(3))^n)+(6-3*sqrt(6)-2*sqrt(3)+3*sqrt(2))*((-sqrt(2+sqrt(3)))^n)+(6-3*sqrt(6)+2*sqrt(3)-3*sqrt(2))*((-sqrt(2-sqrt(3)))^n))/24. (End)
a(2*n+2) = Sum_{k = 0..n} 2^k*binomial(n+k,2*k); a(2*n+1) = Sum_{k = 0..n} n/(n+k)*2^k*binomial(n+k,2*k) for n >= 1. Row sums of A211956. - Peter Bala, May 01 2012
a(n) = ((sqrt(2)+sqrt(3)+(-1)^n*(sqrt(2)-sqrt(3)))*sqrt(2+(2-sqrt(3))^n*(2+ sqrt(3))-(-2+sqrt(3))*(2+ sqrt(3))^n))/(4*sqrt(3)). - Gerry Martens, Jun 06 2015
0 = a(n) - 2*a(n+1) + a(n+2) if n is even, 0 = a(n) - 3*a(n+1) + a(n+2) if n is odd for all n in Z. - Michael Somos, Feb 10 2017

Extensions

More terms from Michael Somos, Aug 01 2001

A085260 Ratio-determined insertion sequence I(0.0833344) (see the link below).

Original entry on oeis.org

1, 12, 155, 2003, 25884, 334489, 4322473, 55857660, 721827107, 9327894731, 120540804396, 1557702562417, 20129592507025, 260127000028908, 3361521407868779, 43439651302265219, 561353945521579068
Offset: 1

Views

Author

John W. Layman, Jun 23 2003

Keywords

Comments

This sequence is the ratio-determined insertion sequence (RDIS) "twin" to A078362 (see the link for an explanation of "twin"). See A082630 or A082981 for recent examples of RDIS sequences.
a(n) = L(n,13), where L is defined as in A108299. - Reinhard Zumkeller, Jun 01 2005
For n >= 2, a(n) equals the permanent of the (2n-2) X (2n-2) tridiagonal matrix with sqrt(11)'s along the main diagonal, and 1's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 08 2011
Seems to be positive values of x (or y) satisfying x^2 - 13xy + y^2 + 11 = 0. - Colin Barker, Feb 10 2014
It appears that the b-file, formulas and programs are based on the conjectured, so far apparently unproved recurrence relation. - M. F. Hasler, Nov 05 2018
Nonnegative y values in solutions to the Diophantine equation 11*x^2 - 15*y^2 = -4. The corresponding x values are in A126866. Note that a(n+1)^2 - a(n)*a(n+2) = -11. - Klaus Purath, Mar 21 2025

Crossrefs

Row 13 of array A094954.
Cf. similar sequences listed in A238379.

Programs

  • Magma
    I:=[1,12]; [n le 2 select I[n] else 13*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 18 2018
  • Mathematica
    CoefficientList[Series[(1 - x)/(1 - 13 x + x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 12 2014 *)
    LinearRecurrence[{13,-1}, {1,12}, 30] (* G. C. Greubel, Jan 18 2018 *)
  • PARI
    my(x='x+O('x^30)); Vec(x*(1-x)/(1-13*x+x^2)) \\ G. C. Greubel, Jan 18 2018
    

Formula

It appears that the sequence satisfies a(n+1) = 13*a(n) - a(n-1). [Corrected by M. F. Hasler, Nov 05 2018]
If the recurrence a(n+2) = 13*a(n+1) - a(n) holds then for n > 0, a(n)*a(n+3) = 143 + a(n+1)*a(n+2). - Ralf Stephan, May 29 2004
G.f.: x*(1-x)/(1 - 13*x + x^2). - Philippe Deléham, Nov 17 2008
For n>1, a(n) is the numerator of the continued fraction [1,11,1,11,...,1,11] with (n-1) repetitions of 1,11. - Greg Dresden, Sep 10 2019

A085376 Ratio-dependent insertion sequence I(0.36704) (see the link below).

Original entry on oeis.org

1, 3, 11, 30, 109, 297, 1079, 2940, 10681, 29103, 105731, 288090, 1046629, 2851797, 10360559, 28229880, 102558961, 279447003, 1015229051, 2766240150, 10049731549, 27382954497, 99482086439, 271063304820, 984771132841
Offset: 1

Views

Author

John W. Layman, Jun 26 2003

Keywords

Comments

This sequence is the ratio-determined insertion sequence (RDIS) "twin" of I(0.37802)=A080874 and "child" of I(0.33344)=A001835 and I(0.38208)=A001906 in the RDIS recurrence tree (see the link for an explanation of terms). See A082630, A082981, A085348 and A085349 for recent examples of RDIS sequences.
Conjecture: partial sums of A129445. - Sean A. Irvine, Jul 14 2022

Crossrefs

Formula

It is conjectured that a(n) = 10*a(n-2) - a(n-4).
Apparently a(n)*a(n+3) = -3 + a(n+1)*a(n+2). - Ralf Stephan, May 29 2004

A143643 Numerators of the lower principal convergents and the lower intermediate convergents to 3^(1/2).

Original entry on oeis.org

1, 3, 5, 12, 19, 45, 71, 168, 265, 627, 989, 2340, 3691, 8733, 13775, 32592, 51409, 121635, 191861, 453948, 716035, 1694157, 2672279, 6322680, 9973081, 23596563, 37220045, 88063572, 138907099, 328657725, 518408351, 1226567328, 1934726305, 4577611587, 7220496869, 17083879020, 26947261171, 63757904493, 100568547815
Offset: 1

Views

Author

Clark Kimberling, Aug 27 2008

Keywords

Comments

The lower principal and intermediate convergents to 3^(1/2), beginning with 1/1, 3/2, 5/3, 12/7, 19/11, form a strictly increasing sequence; with essentially, numerators being this sequence and denominators being A005246.
sqrt(floor(a(n)^2/3)+1) = A005246(n+1). Also see A082630. - Richard R. Forberg, Nov 14 2013
a(n) = U_n(sqrt(6),1) for n odd and a(n) = 3*U_n(sqrt(6),1) for n even, where U_n(sqrt(R),Q) denotes the Lehmer sequence with parameters R and Q. This sequence is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for all positive integers n and m. Consequently, this sequence is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Sep 03 2019

Examples

			From _Peter Bala_, Sep 03 2019: (Start)
If p(n)/q(n) denotes the n-th convergent to the simple continued fraction alpha = [c(0); c(1), c(2), ...] then a lower semiconvergent is a rational number of the form ( p(2*n) + m*p(2*n+1) )/( q(2*n) + m*q(2*n+1) ) where 0 <= m <= c(2*n+2). The lower semiconvergents include the even-indexed convergents p(2*n)/q(2*n) and give an increasing sequence of approximations to alpha from below.
In this case the simple continued fraction expansion sqrt(3) = [1; 1, 2, 1, 2, ...] produces the sequence of convergents (p(n)/q(n))n>=0 = [1/1, 2/1, 5/3, 7/4, 19/11, 26,15, 71/41, ...].
Thus the increasing sequence of lower semiconvergents begins 1/1, (1 + 2)/(1 + 1) = 3/2, (1 + 2*2)/(1 + 2*1) = 5/3, (5 + 7)/(3 + 4) = 12/7, (5 + 2*7)/(3 + 2*4) = 19/11, ... with numerators 1, 3, 5, 12, 19, .... (End)
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • Clark Kimberling, "Best lower and upper approximates to irrational numbers," Elemente der Mathematik, 52 (1997) 122-126.

Crossrefs

Formula

a(n) = 4*a(n-2)-a(n-4). G.f.: x*(1+3*x+x^2)/(1-4*x^2+x^4). - Colin Barker, Apr 28 2012

A093652 Let a(1) = 1, a(2) = 2, a(3) = 7, a(4) = 15 and for n >= 5 set a(n) = (n*b(n) - b(n-2)) / 2, where b(n) = 4*b(n-2) - b(n-4) for n >= 5 and b(1) = 1, b(2) = 2, b(3) = 5, b(4) = 8.

Original entry on oeis.org

1, 2, 7, 15, 45, 86, 239, 433, 1157, 2034, 5307, 9151, 23497, 39974, 101467, 170913, 430089, 718946, 1796975, 2985775, 7422437, 12272502, 30373191, 50016721, 123327373, 202395986, 497484067, 814061151, 1995542913, 3257222726, 7965875891, 12973832257, 31663779857
Offset: 1

Views

Author

Harri Aaltonen, May 15 2004, Apr 12 2008

Keywords

Comments

a(n)/b(n) gives the ohm value of a ladder of unit resistors measured from opposite corners. The ladder is best described as a line of n squares, where every segment has a resistance of 1 ohm.
1/(n - 2*a(n)/b(n)) approaches 2 + sqrt(3) as n increases.

Crossrefs

Cf. A082630.

Programs

  • Maple
    a_list := proc(last) local B, C, k;
       B := [1,2,5, 8];
       C := [1,2,7,15];
       for k from 5 to last do
          B := [op(B), 4*B[k-2]-B[k-4]];
          C := [op(C), (k*B[k]-B[k-2])/2];
       od;
    C end:
    a_list(50); # After Harri Aaltonen, Peter Luschny, Mar 14 2020
  • Mathematica
    LinearRecurrence[{0, 8, 0, -18, 0, 8, 0, -1}, {1, 2, 7, 15, 45, 86, 239, 433}, 50] (* Jean-François Alcover, Oct 24 2023 *)

Formula

Conjecture: b(n) = A082630(n). If true, we can write a(n) = (n*A082630(n) - A082630(n-2)) / 2.
From Colin Barker, Dec 20 2019: (Start)
G.f.: x*(1 + 2*x - x^2 - x^3 + 7*x^4 + 2*x^5 - 3*x^6 - x^7) / (1 - 4*x^2 + x^4)^2.
a(n) = 8*a(n-2) - 18*a(n-4) + 8*a(n-6) - a(n-8) for n>8.
(End)

Extensions

Edited by Peter Luschny, Jun 14 2021

A230369 A strong divisibility sequence associated with the algebraic integer 2 + i.

Original entry on oeis.org

1, 2, 1, 8, 1, 2, 1, 48, 1, 2, 1, 104, 1, 2, 1, 1632, 1, 2, 1, 8, 1, 2, 1, 1872, 1, 2, 109, 232, 1, 1342, 1, 3264, 1, 2, 1, 3848, 149, 2, 1, 1968, 1, 2, 1, 712, 1, 2, 1, 445536, 1, 2, 1, 424, 1, 218, 1, 1392, 1, 2, 1, 69784, 1, 2, 1, 6528, 1, 2, 1, 8, 1, 2, 1, 15168816, 1, 298, 1, 8, 1, 2, 1, 66912, 109, 2
Offset: 1

Views

Author

Peter Bala, Jan 10 2014

Keywords

Comments

Let alpha be an algebraic integer and define a sequence of integers a(n) by the condition a(n) = max {integer d : alpha^n == 1 (mod d)}. Silverman shows that a(n) is a strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n, m)) for all n and m in N; in particular, if n divides m then a(n) divides a(m). For the present sequence we take alpha = 2 + i. For other examples see A230368, A235450 and (conjecturally) A082630.

Crossrefs

Programs

  • Maple
    seq( gcd( 1/2*((2 - I)^n + (2 + I)^n - 2), I/2*((2 + I)^n - (2 - I )^n) ), n = 1..80 );
  • Mathematica
    Table[GCD[((2-I)^n +(2+I)^n -2)/2, I*((2+I)^n -(2-I)^n)/2], {n, 0, 85}] (* G. C. Greubel, Mar 21 2019 *)
  • PARI
    {a(n) = gcd(((2-I)^n +(2+I)^n -2)/2, I*((2+I)^n -(2-I)^n)/2)}; \\ G. C. Greubel, Mar 21 2019

Formula

a(n) = max {integer d : (2 + i)^n == 1 (mod d)}.
a(n) = gcd(((2 - i)^n + (2 + i)^n - 2)/2, i*((2 + i)^n - (2 - i)^n)/2).
As n -> inf, lim sup log(a(n))/n = 0.

A085348 Ratio-determined insertion sequence I(0.264) (see the link below).

Original entry on oeis.org

1, 4, 19, 72, 341, 1292, 6119, 23184, 109801, 416020, 1970299, 7465176, 35355581, 133957148, 634430159, 2403763488, 11384387281, 43133785636, 204284540899, 774004377960, 3665737348901, 13888945017644, 65778987739319
Offset: 0

Views

Author

John W. Layman, Jun 24 2003

Keywords

Comments

This is one of the "twin" ratio-determined insertion sequences (RDIS) that are "children" in the next generation below the "parent" sequences I(0.25024) (A004253) and I(0.26816) (A001353) in the recurrence tree of RDIS sequences. The RDIS twin of this sequence is A085349. See the link for an explanation of RDIS twin. See A082630 or A082981 for other recent examples of RDIS sequences.
Assuming that a(n) = 18a(n-2) - a(n-4) is true: For n >= 2, a(n) = (t(i+2n+2) - t(i))/(t(i+n+2) + t(i+n)*(-1)^(n-1)), where (t) is any recurrence of the form (4,1) without regard to initial values. With an additional initional 0 is this sequence the union of A060645 for even n and A049629 for odd n. - Klaus Purath, Sep 22 2024

Crossrefs

Formula

It appears that a(n)=18a(n-2)-a(n-4).
Apparently a(n)a(n+3) = -4 + a(n+1)a(n+2). - Ralf Stephan, May 29 2004
From Klaus Purath, Sep 22 2024: (Start)
Assuming that a(n) = 18a(n-2) - a(n-4) is true:
a(2n) = 5a(2n-1) - a(2n-2), n >= 1.
a(2n+1) = 4a(2n) - a(2n-1), n >= 1. (End)

A085349 Ratio-determined insertion sequence I(0.26688) (see the link below).

Original entry on oeis.org

1, 4, 15, 71, 269, 1274, 4827, 22861, 86617, 410224, 1554279, 7361171, 27890405, 132090854, 500473011, 2370274201, 8980623793, 42532844764, 161150755263, 763220931551, 2891732970941, 13695443923154, 51890042721675
Offset: 1

Views

Author

John W. Layman, Jun 24 2003

Keywords

Comments

This is one of the "twin" ratio-determined insertion sequences (RDIS) that are "children" in the next generation below the "parent" sequences I(0.25024) (A004253) and I(0.26816) (A001353) in the recurrence tree of RDIS sequences. The RDIS twin of this sequence is A085348. See the link for an explanation of RDIS twin. See A082630 or A082981 for other recent examples of RDIS sequences.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,18,0,-1},{1,4,15,71},30] (* Harvey P. Dale, Mar 04 2013 *)

Formula

It appears that a(n)=18a(n-2)-a(n-4).
Apparently a(n)a(n+3) = 11 + a(n+1)a(n+2). - Ralf Stephan, May 29 2004

A096146 Prime numerators of the rational convergents to sqrt(3).

Original entry on oeis.org

2, 5, 7, 19, 71, 97, 3691, 191861, 138907099, 708158977, 26947261171
Offset: 1

Views

Author

Cino Hilliard, Jul 24 2004

Keywords

Comments

Next term is too large to include.
This is the prime subsequence of A002531. See also A086386 for numerators where both numerator and denominator are primes. - Ray Chandler, Aug 01 2004

Crossrefs

Programs

  • Mathematica
    Select[Numerator[Convergents[Sqrt[3],200]],PrimeQ] (* Harvey P. Dale, Nov 08 2022 *)
  • PARI
    \\ Continued fraction rational approximation of numeric constants f. m=steps.
    cfracnumprime(m,f) = { default(realprecision,3000); cf = vector(m+10); x=f; for(n=0,m, i=floor(x); x=1/(x-i); cf[n+1] = i; ); for(m1=0,m, r=cf[m1+1]; forstep(n=m1,1,-1, r = 1/r; r+=cf[n]; ); numer=numerator(r); denom=denominator(r); if(ispseudoprime(numer),print1(numer,", ")); ) }

Extensions

Offset corrected by Amiram Eldar, Jul 11 2024

A230368 A strong divisibility sequence associated with the algebraic integer 1 + i.

Original entry on oeis.org

1, 1, 1, 5, 1, 1, 1, 15, 1, 1, 1, 65, 1, 1, 1, 255, 1, 1, 1, 1025, 1, 1, 1, 4095, 1, 1, 1, 16385, 1, 1, 1, 65535, 1, 1, 1, 262145, 1, 1, 1, 1048575, 1, 1, 1, 4194305, 1, 1, 1, 16777215, 1, 1, 1, 67108865, 1, 1, 1, 268435455, 1, 1, 1, 1073741825
Offset: 1

Views

Author

Peter Bala, Jan 10 2014

Keywords

Comments

Let alpha be an algebraic integer and define a sequence of integers a(n) by the condition a(n) = max { integer d : alpha^n == 1 (mod d)}. Silverman shows that a(n) is a strong divisibility sequence, that is gcd(a(n), a(m)) = a(gcd(n, m)) for all n and m in N; in particular, if n divides m then a(n) divides a(m). For the present sequence we take alpha = 1 + i. For other examples see A230369, A235450 and (conjecturally) A082630.

Crossrefs

Programs

  • Maple
    seq( gcd( 1/2*((1 - I)^n + (1 + I)^n - 2), I/2*((1 + I)^n - (1 - I )^n ) ), n = 1..80);

Formula

a(4*n) = |(-4)^n - 1| otherwise a(n) = 1.
a(4*n) = 5*A015521(n).
O.g.f.: 1/(1 - 4*x^4) - 1/(1 + x^4) + 1/(1 - x) - 1/(1 - x^4) = x*(-1 -x -x^2 -5*x^3 +3*x^4 +3*x^5 +3*x^6 +5*x^7 +4*x^8 +4*x^9 +4*x^10) / ( (1-x) *(1+x) *(2*x^2+1) *(2*x^2-1) *(x^2+1) *(x^4+1) ).
Recurrence equation: a(n) = 4*a(n-4) + a(n-8) - 4*a(n-12).
Showing 1-10 of 12 results. Next