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

A084068 a(1) = 1, a(2) = 2; a(2*k) = 2*a(2*k-1) - a(2*k-2), a(2*k+1) = 4*a(2*k) - a(2*k-1).

Original entry on oeis.org

1, 2, 7, 12, 41, 70, 239, 408, 1393, 2378, 8119, 13860, 47321, 80782, 275807, 470832, 1607521, 2744210, 9369319, 15994428, 54608393, 93222358, 318281039, 543339720, 1855077841, 3166815962, 10812186007, 18457556052, 63018038201, 107578520350
Offset: 1

Views

Author

Benoit Cloitre, May 10 2003

Keywords

Comments

The upper principal and intermediate convergents to 2^(1/2), beginning with 2/1, 3/2, 10/7, 17/12, 58/41, form a strictly decreasing sequence; essentially, numerators=A143609 and denominators=A084068. - Clark Kimberling, Aug 27 2008
From Peter Bala, Mar 23 2018: (Start)
Define a binary operation o on the real numbers by x o y = x*sqrt(1 + y^2) + y*sqrt(1 + x^2). The operation o is commutative and associative with identity 0. We have
a(2*n + 1) = 1 o 1 o ... o 1 (2*n + 1 terms) and
a(2*n) = (1/sqrt(2))*(1 o 1 o ... o 1) (2*n terms). Cf. A049629, A108412 and A143608.
This is a fourth-order divisibility sequence. Indeed, a(2*n) = U(2*n)/sqrt(2) and a(2*n+1) = U(2*n+1), where U(n) is the Lehmer sequence [Lehmer, 1930] defined by the recurrence U(n) = 2*sqrt(2)*U(n-1) - U(n-2) with U(0) = 0 and U(1) = 1. The solution to the recurrence is U(n) = (1/2)*( (sqrt(2) + 1)^n - (sqrt(2) - 1)^n ).
It appears that this sequence consists of those numbers m such that 2*m^2 = floor( m*sqrt(2) * ceiling(m*sqrt(2)) ). Cf. A084069. (End)
Conjecture: a(n) is the earliest occurrence of n in A348295, which is to say, a(n) is the least m such that Sum_{k=1..m} (-1)^(floor(k*(sqrt(2)-1))) = Sum_{k=1..m} (-1)^A097508(k) = n. This has been confirmed for the first 32 terms by Chai Wah Wu, Oct 21 2021. - Jianing Song, Jul 16 2022

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.

Crossrefs

Programs

  • Maple
    a := proc (n) if `mod`(n, 2) = 1 then (1/2)*(sqrt(2) + 1)^n - (1/2)*(sqrt(2) - 1)^n else (1/2)*((sqrt(2) + 1)^n - (sqrt(2) - 1)^n)/sqrt(2) end if;
    end proc:
    seq(simplify(a(n)), n = 1..30); # Peter Bala, Mar 25 2018
  • Mathematica
    a[n_] := ((Sqrt[2]+1)^n - (Sqrt[2]-1)^n) ((-1)^n(Sqrt[2]-2) + (Sqrt[2]+2))/8;
    Table[Simplify[a[n]], {n, 30}] (* after Paul Barry, Peter Luschny, Mar 29 2018 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,0,6,0]^(n-1)*[1;2;7;12])[1,1] \\ Charles R Greathouse IV, Jun 20 2015

Formula

"A Diofloortin equation": n such that 2*n^2=floor(n*sqrt(2)*ceiling(n*sqrt(2))).
a(n)*a(n+3) = -2 + a(n+1)*a(n+2).
From Paul Barry, Jun 06 2006: (Start)
G.f.: x*(1+x)^2/(1-6*x^2+x^4);
a(n) = ((sqrt(2)+1)^n-(sqrt(2)-1)^n)*((sqrt(2)/8-1/4)*(-1)^n+sqrt(2)/8+1/4);
a(n) = Sum_{k=0..floor(n/2)} 2^k*(C(n,2*k)-C(n-1,2*k+1)*(1+(-1)^n)/2). (End)
A000129(n+1) = A079496(n) + a(n). - Gary W. Adamson, Sep 18 2007
Equals A133566 * A000129, where A000129 = the Pell sequence. - Gary W. Adamson, Sep 18 2007
From Peter Bala, Mar 23 2018: (Start)
a(2*n + 2) = a(2*n + 1) + sqrt( (1 + a(2*n + 1)^2)/2 ).
a(2*n + 1) = 2*a(2*n) + sqrt( (1 + 2*a(2*n)^2) ).
More generally,
a(2*n+2*m+1) = sqrt(2)*a(2*n) o a(2*m+1), where o is the binary operation defined above, that is,
a(2*n+2*m+1) = sqrt(2)*a(2*n)*sqrt(1 + a(2*m+1)^2) + a(2*m+1)*sqrt(1 + 2*a(2*n)^2).
sqrt(2)*a(2*(n + m)) = (sqrt(2)*a(2*n)) o (sqrt(2)*a(2*m)), that is,
a(2*n+2*m) = a(2*n)*sqrt(1 + 2*a(2*m)^2) + a(2*m)*sqrt(1 + 2*a(2*n)^2).
sqrt(1 + 2*a(2*n)^2) = A001541(n).
1 + 2*a(2*n)^2 = A055792(n+1).
a(2*n) - a(2*n-1) = A001653(n).
(1 + a(2*n+1)^2)/2 = A008844(n). (End)
a(n) = A000129(n) for even n and A001333(n) for odd n. - R. J. Mathar, Oct 15 2021

A001080 a(n) = 16*a(n-1) - a(n-2) with a(0) = 0, a(1) = 3.

Original entry on oeis.org

0, 3, 48, 765, 12192, 194307, 3096720, 49353213, 786554688, 12535521795, 199781794032, 3183973182717, 50743789129440, 808716652888323, 12888722657083728, 205410845860451325, 3273684811110137472, 52173546131901748227, 831503053299317834160
Offset: 0

Views

Author

Keywords

Comments

Also 7*x^2 + 1 is a square; n=7 in PARI script below. - Cino Hilliard, Mar 08 2003
That is, the terms are solutions y of the Pell-Fermat equation x^2 - 7 * y^2 = 1. The corresponding values of x are in A001081. (x,y) = (1,0), (8,3), (127,48), ... - Bernard Schott, Feb 23 2019
The first solution to the equation x^2 - 7*y^2 = 1 is (X(0); Y(0)) = (1; 0) and the other solutions are defined by: (X(n); Y(n))= (8*X(n-1) + 21*Y(n-1); 3*X(n-1) + 8*Y(n-1)), with n >= 1. - Mohamed Bouhamida, Jan 16 2020

References

  • 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).
  • V. Thébault, Les Récréations Mathématiques. Gauthier-Villars, Paris, 1952, p. 281.

Crossrefs

Equals 3 * A077412. Bisection of A084069.
Cf. A048907.
Cf. A001081, A010727. - Vincenzo Librandi, Feb 16 2009

Programs

  • GAP
    a:=[0,3];; for n in [3..30] do a[n]:=16*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Feb 23 2019
  • Magma
    I:=[0,3]; [n le 2 select I[n] else 16*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 20 2017
    
  • Maple
    A001080:=3*z/(1-16*z+z**2); # conjectured (correctly) by Simon Plouffe in his 1992 dissertation
  • Mathematica
    LinearRecurrence[{16,-1},{0,3},30] (* Harvey P. Dale, Nov 01 2011 *)
    CoefficientList[Series[3*x/(1-16*x+x^2), {x, 0, 30}], x] (* G. C. Greubel, Dec 20 2017 *)
  • PARI
    nxsqp1(m,n) = { for(x=1,m, y = n*x*x+1; if(issquare(y),print1(x" ")) ) }
    
  • PARI
    x='x+O('x^30); concat([0], Vec(3*x/(1-16*x+x^2))) \\ G. C. Greubel, Dec 20 2017
    
  • SageMath
    (3*x/(1-16*x+x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 23 2019
    

Formula

G.f.: 3*x/(1-16*x+x^2).
From Mohamed Bouhamida, Sep 20 2006: (Start)
a(n) = 15*(a(n-1) + a(n-2)) - a(n-3).
a(n) = 17*(a(n-1) - a(n-2)) + a(n-3). (End)
a(n) = 16*a(n-1) - a(n-2) with a(1)=0 and a(2)=3. - Sture Sjöstedt, Nov 18 2011
E.g.f.: exp(8*x)*sinh(3*sqrt(7)*x)/sqrt(7). - G. C. Greubel, Feb 23 2019

A084070 a(n) = 38*a(n-1) - a(n-2), with a(0)=0, a(1)=6.

Original entry on oeis.org

0, 6, 228, 8658, 328776, 12484830, 474094764, 18003116202, 683644320912, 25960481078454, 985814636660340, 37434995712014466, 1421544022419889368, 53981237856243781518, 2049865494514843808316, 77840907553707820934490, 2955904621546382351702304
Offset: 0

Views

Author

Benoit Cloitre, May 10 2003

Keywords

Comments

This sequence gives the values of y in solutions of the Diophantine equation x^2 - 10*y^2 = 1. The corresponding x values are in A078986. - Vincenzo Librandi, Aug 08 2010 [edited by Jon E. Schoenfield, May 04 2014]

Examples

			G.f. = 6*x + 228*x^2 + 8658*x^3 + 328776*x^4 + ... - _Michael Somos_, Feb 24 2023
		

Crossrefs

Programs

  • GAP
    a:=[0,6];; for n in [3..20] do a[n]:=38*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Jan 12 2020
  • Magma
    I:=[0,6]; [n le 2 select I[n] else 38*Self(n-1) - Self(n-2): n in [1..20]]; // G. C. Greubel, Jan 12 2020
    
  • Maple
    seq( simplify(6*ChebyshevU(n-1, 19)), n=0..20); # G. C. Greubel, Jan 12 2020
  • Mathematica
    LinearRecurrence[{38,-1},{0,6},30] (* Harvey P. Dale, Nov 01 2011 *)
    6*ChebyshevU[Range[20]-2, 19] (* G. C. Greubel, Jan 12 2020 *)
  • PARI
    u=0; v=6; for(n=2,20, w=38*v-u; u=v; v=w; print1(w,","))
    
  • PARI
    vector(21, n, 6*polchebyshev(n-2, 2, 19) ) \\ G. C. Greubel, Jan 12 2020
    
  • Sage
    [6*chebyshev_U(n-1, 19) for n in (0..20)] # G. C. Greubel, Jan 12 2020
    

Formula

Numbers k such that 10*k^2 = floor(k*sqrt(10)*ceiling(k*sqrt(10))).
From Mohamed Bouhamida, Sep 20 2006: (Start)
a(n) = 37*(a(n-1) + a(n-2)) - a(n-3).
a(n) = 39*(a(n-1) - a(n-2)) + a(n-3). (End)
From R. J. Mathar, Feb 19 2008: (Start)
O.g.f.: 6*x/(1 - 38*x + x^2).
a(n) = 6*A078987(n-1). (End)
a(n) = 6*ChebyshevU(n-1, 19). - G. C. Greubel, Jan 12 2020
a(n) = A005668(2*n). - Michael Somos, Feb 24 2023
Showing 1-3 of 3 results.