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

A002349 Take solution to Pellian equation x^2 - n*y^2 = 1 with smallest positive y and x >= 0; sequence gives a(n) = y, or 0 if n is a square. A002350 gives values of x.

Original entry on oeis.org

0, 2, 1, 0, 4, 2, 3, 1, 0, 6, 3, 2, 180, 4, 1, 0, 8, 4, 39, 2, 12, 42, 5, 1, 0, 10, 5, 24, 1820, 2, 273, 3, 4, 6, 1, 0, 12, 6, 4, 3, 320, 2, 531, 30, 24, 3588, 7, 1, 0, 14, 7, 90, 9100, 66, 12, 2, 20, 2574, 69, 4, 226153980, 8, 1, 0, 16, 8, 5967, 4, 936, 30, 413, 2, 267000, 430, 3
Offset: 1

Views

Author

Keywords

Examples

			For n = 1, 2, 3, 4, 5 solutions are (x,y) = (1, 0), (3, 2), (2, 1), (1, 0), (9, 4).
		

References

  • Albert H. Beiler, "The Pellian" (chap 22), Recreations in the Theory of Numbers, 2nd ed. NY: Dover, 1966.
  • A. Cayley, Report of a committee appointed for the purpose of carrying on the tables connected with the Pellian equation ..., Collected Mathematical Papers. Vols. 1-13, Cambridge Univ. Press, London, 1889-1897, Vol. 13, pp. 430-443.
  • C. F. Degen, Canon Pellianus. Hafniae, Copenhagen, 1817.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
  • 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).
  • E. E. Whitford, The Pell Equation.

Crossrefs

Programs

  • Mathematica
    a[n_] := If[IntegerQ[Sqrt[n]], 0, For[y=1, !IntegerQ[Sqrt[n*y^2+1]], y++, Null]; y]
    (* Second program: *)
    PellSolve[(m_Integer)?Positive] := Module[{cof, n, s}, cof = ContinuedFraction[ Sqrt[m]]; n = Length[ Last[cof]]; If[ OddQ[n], n = 2*n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[m], n]]; {Numerator[s], Denominator[s]}]; f[n_] := If[ !IntegerQ[ Sqrt[n]], PellSolve[n][[2]], 0]; Table[ f[n], {n, 0, 75}]
  • Python
    from sympy.ntheory.primetest import is_square
    from sympy.solvers.diophantine.diophantine import diop_DN
    def A002349(n): return 0 if is_square(n) else next(b for a,b in diop_DN(n,1)) # Chai Wah Wu, Feb 11 2025

Formula

a(prime(i)) = A081234(i). - R. J. Mathar, Feb 25 2025

Extensions

More terms from Enoch Haga, Mar 14 2002
Better description from Robert G. Wilson v, Apr 14 2003

A001541 a(0) = 1, a(1) = 3; for n > 1, a(n) = 6*a(n-1) - a(n-2).

Original entry on oeis.org

1, 3, 17, 99, 577, 3363, 19601, 114243, 665857, 3880899, 22619537, 131836323, 768398401, 4478554083, 26102926097, 152139002499, 886731088897, 5168247530883, 30122754096401, 175568277047523, 1023286908188737, 5964153172084899, 34761632124320657
Offset: 0

Views

Author

Keywords

Comments

Chebyshev polynomials of the first kind evaluated at 3.
This sequence gives the values of x in solutions of the Diophantine equation x^2 - 8*y^2 = 1, the corresponding values of y are in A001109. For n > 0, the ratios a(n)/A001090(n) may be obtained as convergents to sqrt(8): either successive convergents of [3; -6] or odd convergents of [2; 1, 4]. - Lekraj Beedassy, Sep 09 2003 [edited by Jon E. Schoenfield, May 04 2014]
Also gives solutions to the equation x^2 - 1 = floor(x*r*floor(x/r)) where r = sqrt(8). - Benoit Cloitre, Feb 14 2004
Appears to give all solutions greater than 1 to the equation: x^2 = ceiling(x*r*floor(x/r)) where r = sqrt(2). - Benoit Cloitre, Feb 24 2004
This sequence give numbers n such that (n-1)*(n+1)/2 is a perfect square. Remark: (i-1)*(i+1)/2 = (i^2-1)/2 = -1 = i^2 with i = sqrt(-1) so i is also in the sequence. - Pierre CAMI, Apr 20 2005
a(n) is prime for n = {1, 2, 4, 8}. Prime a(n) are {3, 17, 577, 665857}, which belong to A001601(n). a(2k-1) is divisible by a(1) = 3. a(4k-2) is divisible by a(2) = 17. a(8k-4) is divisible by a(4) = 577. a(16k-8) is divisible by a(8) = 665857. - Alexander Adamchuk, Nov 24 2006
The upper principal convergents to 2^(1/2), beginning with 3/2, 17/12, 99/70, 577/408, comprise a strictly decreasing sequence; essentially, numerators=A001541 and denominators=A001542. - Clark Kimberling, Aug 26 2008
Also index of sequence A082532 for which A082532(n) = 1. - Carmine Suriano, Sep 07 2010
Numbers n such that sigma(n-1) and sigma(n+1) are both odd numbers. - Juri-Stepan Gerasimov, Mar 28 2011
Also, numbers such that floor(a(n)^2/2) is a square: base 2 analog of A031149, A204502, A204514, A204516, A204518, A204520, A004275, A001075. - M. F. Hasler, Jan 15 2012
Numbers such that 2n^2 - 2 is a square. Also integer square roots of the expression 2*n^2 + 1, at values of n given by A001542. Also see A228405 regarding 2n^2 -+ 2^k generally for k >= 0. - Richard R. Forberg, Aug 20 2013
Values of x (or y) in the solutions to x^2 - 6xy + y^2 + 8 = 0. - Colin Barker, Feb 04 2014
Panda and Ray call the numbers in this sequence the Lucas-balancing numbers C_n (see references and links).
Partial sums of X or X+1 of Pythagorean triples (X,X+1,Z). - Peter M. Chema, Feb 03 2017
a(n)/A001542(n) is the closest rational approximation to sqrt(2) with a numerator not larger than a(n), and 2*A001542(n)/a(n) is the closest rational approximation to sqrt(2) with a denominator not larger than a(n). These rational approximations together with those obtained from the sequences A001653 and A002315 give a complete set of closest rational approximations to sqrt(2) with restricted numerator or denominator. a(n)/A001542(n) > sqrt(2) > 2*A001542(n)/a(n). - A.H.M. Smeets, May 28 2017
x = a(n), y = A001542(n) are solutions of the Diophantine equation x^2 - 2y^2 = 1 (Pell equation). x = 2*A001542(n), y = a(n) are solutions of the Diophantine equation x^2 - 2y^2 = -2. Both together give the set of fractional approximations for sqrt(2) obtained from limited fractions obtained from continued fraction representation to sqrt(2). - A.H.M. Smeets, Jun 22 2017
a(n) is the radius of the n-th circle among the sequence of circles generated as follows: Starting with a unit circle centered at the origin, every subsequent circle touches the previous circle as well as the two limbs of hyperbola x^2 - y^2 = 1, and lies in the region y > 0. - Kaushal Agrawal, Nov 10 2018
All of the positive integer solutions of a*b+1=x^2, a*c+1=y^2, b*c+1=z^2, x+z=2*y, 0A001542(n), b=A005319(n), c=A001542(n+1), x=A001541(n), y=A001653(n+1), z=A002315(n) with 0Michael Somos, Jun 26 2022

Examples

			99^2 + 99^2 = 140^2 + 2. - _Carmine Suriano_, Jan 05 2015
G.f. = 1 + 3*x + 17*x^2 + 99*x^3 + 577*x^4 + 3363*x^5 + 19601*x^6 + 114243*x^7 + ...
		

References

  • Julio R. Bastida, Quadratic properties of a linearly recurrent sequence. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 163--166, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561042 (81e:10009)
  • J. W. L. Glaisher, On Eulerian numbers (formulas, residues, end-figures), with the values of the first twenty-seven, Quarterly Journal of Mathematics, vol. 45, 1914, pp. 1-51.
  • G. K. Panda, Some fascinating properties of balancing numbers, In Proc. of Eleventh Internat. Conference on Fibonacci Numbers and Their Applications, Cong. Numerantium 194 (2009), 185-189.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 257-258.
  • P.-F. Teilhet, Query 2376, L'Intermédiaire des Mathématiciens, 11 (1904), 138-139. - N. J. A. Sloane, Mar 08 2022

Crossrefs

Bisection of A001333. A003499(n) = 2a(n).
Cf. A055997 = numbers n such that n(n-1)/2 is a square.
Row 1 of array A188645.
Cf. A055792 (terms squared), A132592.

Programs

  • Haskell
    a001541 n = a001541_list !! (n-1)
    a001541_list =
    1 : 3 : zipWith (-) (map (* 6) $ tail a001541_list) a001541_list
    -- Reinhard Zumkeller, Oct 06 2011
    (Scheme, with memoization-macro definec)
    (definec (A001541 n) (cond ((zero? n) 1) ((= 1 n) 3) (else (- (* 6 (A001541 (- n 1))) (A001541 (- n 2))))))
    ;; Antti Karttunen, Oct 04 2016
  • Magma
    [n: n in [1..10000000] |IsSquare(8*(n^2-1))]; // Vincenzo Librandi, Nov 18 2010
    
  • Maple
    a[0]:=1: a[1]:=3: for n from 2 to 26 do a[n]:=6*a[n-1]-a[n-2] od: seq(a[n], n=0..20); # Zerinvary Lajos, Jul 26 2006
    A001541:=-(-1+3*z)/(1-6*z+z**2); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    Table[Simplify[(1/2) (3 + 2 Sqrt[2])^n + (1/2) (3 - 2 Sqrt[2])^n], {n, 0, 20}] (* Artur Jasinski, Feb 10 2010 *)
    a[ n_] := If[n == 0, 1, With[{m = Abs @ n}, m Sum[4^i Binomial[m + i, 2 i]/(m + i), {i, 0, m}]]]; (* Michael Somos, Jul 11 2011 *)
    a[ n_] := ChebyshevT[ n, 3]; (* Michael Somos, Jul 11 2011 *)
    LinearRecurrence[{6, -1}, {1, 3}, 50] (* Vladimir Joseph Stephan Orlovsky, Feb 12 2012 *)
  • PARI
    {a(n) = real((3 + quadgen(32))^n)}; /* Michael Somos, Apr 07 2003 */
    
  • PARI
    {a(n) = subst( poltchebi( abs(n)), x, 3)}; /* Michael Somos, Apr 07 2003 */
    
  • PARI
    {a(n) = if( n<0, a(-n), polsym(1 - 6*x + x^2, n) [n+1] / 2)}; /* Michael Somos, Apr 07 2003 */
    
  • PARI
    {a(n) = polchebyshev( n, 1, 3)}; /* Michael Somos, Jul 11 2011 */
    
  • PARI
    a(n)=([1,2,2;2,1,2;2,2,3]^n)[3,3] \\ Vim Wenders, Mar 28 2007
    

Formula

G.f.: (1-3*x)/(1-6*x+x^2). - Barry E. Williams and Wolfdieter Lang, May 05 2000
E.g.f.: exp(3*x)*cosh(2*sqrt(2)*x). Binomial transform of A084128. - Paul Barry, May 16 2003
From N. J. A. Sloane, May 16 2003: (Start)
a(n) = sqrt(8*((A001109(n))^2) + 1).
a(n) = T(n, 3), with Chebyshev's T-polynomials A053120. (End)
a(n) = ((3+2*sqrt(2))^n + (3-2*sqrt(2))^n)/2.
a(n) = cosh(2*n*arcsinh(1)). - Herbert Kociemba, Apr 24 2008
a(n) ~ (1/2)*(sqrt(2) + 1)^(2*n). - Joe Keane (jgk(AT)jgk.org), May 15 2002
For all elements x of the sequence, 2*x^2 - 2 is a square. Limit_{n -> infinity} a(n)/a(n-1) = 3 + 2*sqrt(2). - Gregory V. Richardson, Oct 10 2002 [corrected by Peter Pein, Mar 09 2009]
a(n) = 3*A001109(n) - A001109(n-1), n >= 1. - Barry E. Williams and Wolfdieter Lang, May 05 2000
For n >= 1, a(n) = A001652(n) - A001652(n-1). - Charlie Marion, Jul 01 2003
From Paul Barry, Sep 18 2003: (Start)
a(n) = ((-1+sqrt(2))^n + (1+sqrt(2))^n + (1-sqrt(2))^n + (-1-sqrt(2))^n)/4 (with interpolated zeros).
E.g.f.: cosh(x)*cosh(sqrt(2)x) (with interpolated zeros). (End)
For n > 0, a(n)^2 + 1 = 2*A001653(n-1)*A001653(n). - Charlie Marion, Dec 21 2003
a(n)^2 + a(n+1)^2 = 2*(A001653(2*n+1) - A001652(2*n)). - Charlie Marion, Mar 17 2003
a(n) = Sum_{k >= 0} binomial(2*n, 2*k)*2^k = Sum_{k >= 0} A086645(n, k)*2^k. - Philippe Deléham, Feb 29 2004
a(n)*A002315(n+k) = A001652(2*n+k) + A001652(k) + 1; for k > 0, a(n+k)*A002315(n) = A001652(2*n+k) - A001652(k-1). - Charlie Marion, Mar 17 2003
For n > k, a(n)*A001653(k) = A011900(n+k) + A053141(n-k-1). For n <= k, a(n)*A001653(k) = A011900(n+k) + A053141(k-n). - Charlie Marion, Oct 18 2004
A053141(n+1) + A055997(n+1) = a(n+1) + A001109(n+1). - Creighton Dement, Sep 16 2004
a(n+1) - A001542(n+1) = A090390(n+1) - A046729(n) = A001653(n); a(n+1) - 4*A079291(n+1) = (-1)^(n+1). Formula generated by the floretion - .5'i + .5'j - .5i' + .5j' - 'ii' + 'jj' - 2'kk' + 'ij' + .5'ik' + 'ji' + .5'jk' + .5'ki' + .5'kj' + e. - Creighton Dement, Nov 16 2004
a(n) = sqrt( A055997(2*n) ). - Alexander Adamchuk, Nov 24 2006
a(2n) = A056771(n). a(2*n+1) = 3*A077420(n). - Alexander Adamchuk, Feb 01 2007
a(n) = (A000129(n)^2)*4 + (-1)^n. - Vim Wenders, Mar 28 2007
2*a(k)*A001653(n)*A001653(n+k) = A001653(n)^2 + A001653(n+k)^2 + A001542(k)^2. - Charlie Marion, Oct 12 2007
a(n) = A001333(2*n). - Ctibor O. Zizka, Aug 13 2008
A028982(a(n)-1) + 2 = A028982(a(n)+1). - Juri-Stepan Gerasimov, Mar 28 2011
a(n) = 2*A001108(n) + 1. - Paul Weisenhorn, Dec 17 2011
a(n) = sqrt(2*x^2 + 1) with x being A001542(n). - Zak Seidov, Jan 30 2013
a(2n) = 2*a(n)^2 - 1 = a(n)^2 + 2*A001542(n)^2. a(2*n+1) = 1 + 2*A002315(n)^2. - Steven J. Haker, Dec 04 2013
a(n) = 3*a(n-1) + 4*A001542(n-1); e.g., a(4) = 99 = 3*17 + 4*12. - Zak Seidov, Dec 19 2013
a(n) = cos(n * arccos(3)) = cosh(n * log(3 + 2*sqrt(2))). - Daniel Suteu, Jul 28 2016
From Ilya Gutkovskiy, Jul 28 2016: (Start)
Inverse binomial transform of A084130.
Exponential convolution of A000079 and A084058.
Sum_{n>=0} (-1)^n*a(n)/n! = cosh(2*sqrt(2))/exp(3) = 0.4226407909842764637... (End)
a(2*n+1) = 2*a(n)*a(n+1) - 3. - Timothy L. Tiffin, Oct 12 2016
a(n) = a(-n) for all n in Z. - Michael Somos, Jan 20 2017
a(2^n) = A001601(n+1). - A.H.M. Smeets, May 28 2017
a(A298210(n)) = A002350(2*n^2). - A.H.M. Smeets, Jan 25 2018
a(n) = S(n, 6) - 3*S(n-1, 6), for n >= 0, with S(n, 6) = A001109(n+1), (Chebyshev S of A049310). See the first comment and the formula a(n) = T(n, 3). - Wolfdieter Lang, Nov 22 2020
From Peter Bala, Dec 31 2021: (Start)
a(n) = [x^n] (3*x + sqrt(1 + 8*x^2))^n.
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) hold for all prime p and positive integers n and k.
O.g.f. A(x) = 1 + x*d/dx(log(B(x))), where B(x) = 1/sqrt(1 - 6*x + x^2) is the o.g.f. of A001850. (End)
From Peter Bala, Aug 17 2022: (Start)
Sum_{n >= 1} 1/(a(n) - 2/a(n)) = 1/2.
Sum_{n >= 1} (-1)^(n+1)/(a(n) + 1/a(n)) = 1/4.
Sum_{n >= 1} 1/(a(n)^2 - 2) = 1/2 - 1/sqrt(8). (End)
From Peter Bala, Jun 23 2025: (Start)
Product_{n >= 0} (1 + 1/a(2^n)) = sqrt(2).
Product_{n >= 0} (1 - 1/(2*a(2^n))) = (4/7)*sqrt(2). See A002812. (End)

A001075 a(0) = 1, a(1) = 2, a(n) = 4*a(n-1) - a(n-2).

Original entry on oeis.org

1, 2, 7, 26, 97, 362, 1351, 5042, 18817, 70226, 262087, 978122, 3650401, 13623482, 50843527, 189750626, 708158977, 2642885282, 9863382151, 36810643322, 137379191137, 512706121226, 1913445293767, 7141075053842, 26650854921601, 99462344632562, 371198523608647
Offset: 0

Views

Author

Keywords

Comments

Chebyshev's T(n,x) polynomials evaluated at x=2.
x = 2^n - 1 is prime if and only if x divides a(2^(n-2)).
Any k in the sequence is succeeded by 2*k + sqrt{3*(k^2 - 1)}. - Lekraj Beedassy, Jun 28 2002
For all elements x of the sequence, 12*x^2 - 12 is a square. Lim_{n -> infinity} a(n)/a(n-1) = 2 + sqrt(3) = (4 + sqrt(12))/2 which preserves the kinship with the equation "12*x^2 - 12 is a square" where the initial "12" ends up appearing as a square root. - Gregory V. Richardson, Oct 10 2002
This sequence gives the values of x in solutions of the Diophantine equation x^2 - 3*y^2 = 1; the corresponding values of y are in A001353. The solution ratios a(n)/A001353(n) are obtained as convergents of the continued fraction expansion of sqrt(3): either as successive convergents of [2;-4] or as odd convergents of [1;1,2]. - Lekraj Beedassy, Sep 19 2003 [edited by Jon E. Schoenfield, May 04 2014]
a(n) is half the central value in a list of three consecutive integers, the lengths of the sides of a triangle with integer sides and area. - Eugene McDonnell (eemcd(AT)mac.com), Oct 19 2003
a(3+6*k) - 1 and a(3+6*k) + 1 are consecutive odd powerful numbers. See A076445. - T. D. Noe, May 04 2006
The intermediate convergents to 3^(1/2), beginning with 3/2, 12/7, 45/26, 168/97, comprise a strictly increasing sequence; essentially, numerators=A005320, denominators=A001075. - Clark Kimberling, Aug 27 2008
The upper principal convergents to 3^(1/2), beginning with 2/1, 7/4, 26/15, 97/56, comprise a strictly decreasing sequence; numerators=A001075, denominators=A001353. - Clark Kimberling, Aug 27 2008
a(n+1) is the Hankel transform of A000108(n) + A000984(n) = (n+2)*Catalan(n). - Paul Barry, Aug 11 2009
Also, numbers such that floor(a(n)^2/3) is a square: base 3 analog of A031149, A204502, A204514, A204516, A204518, A204520, A004275, A001541. - M. F. Hasler, Jan 15 2012
Pisano period lengths: 1, 2, 2, 4, 3, 2, 8, 4, 6, 6, 10, 4, 12, 8, 6, 8, 18, 6, 5, 12, ... - R. J. Mathar, Aug 10 2012
Except for the first term, positive values of x (or y) satisfying x^2 - 4*x*y + y^2 + 3 = 0. - Colin Barker, Feb 04 2014
Except for the first term, positive values of x (or y) satisfying x^2 - 14*x*y + y^2 + 48 = 0. - Colin Barker, Feb 10 2014
A triangle with row sums generating the sequence can be constructed by taking the production matrix M. Take powers of M, extracting the top rows.
M =
1, 1, 0, 0, 0, 0, ...
2, 0, 3, 0, 0, 0, ...
2, 0, 0, 3, 0, 0, ...
2, 0, 0, 0, 3, 0, ...
2, 0, 0, 0, 0, 3, ...
...
The triangle generated from M is:
1,
1, 1,
3, 1, 3,
11, 3, 3, 9,
41, 11, 9, 9, 27,
...
The left border is A001835 and row sums are (1, 2, 7, 26, 97, ...). - Gary W. Adamson, Jul 25 2016
Even-indexed terms are odd while odd-indexed terms are even. Indeed, a(2*n) = 2*(a(n))^2 - 1 and a(2*n+1) = 2*a(n)*a(n+1) - 2. - Timothy L. Tiffin, Oct 11 2016
For each n, a(0) divides a(n), a(1) divides a(2n+1), a(2) divides a(4*n+2), a(3) divides a(6*n+3), a(4) divides a(8*n+4), a(5) divides a(10n+5), and so on. Thus, a(k) divides a((2*n+1)*k) for each k > 0 and n >= 0. A proof of this can be found in Bhargava-Kedlaya-Ng's first solution to Problem A2 of the 76th Putnam Mathematical Competition. Links to the exam and its solutions can be found below. - Timothy L. Tiffin, Oct 12 2016
From Timothy L. Tiffin, Oct 21 2016: (Start)
If any term a(n) is a prime number, then its index n will be a power of 2. This is a consequence of the results given in the previous two comments. See A277434 for those prime terms.
a(2n) == 1 (mod 6) and a(2*n+1) == 2 (mod 6). Consequently, each odd prime factor of a(n) will be congruent to 1 modulo 6 and, thus, found in A002476.
a(n) == 1 (mod 10) if n == 0 (mod 6), a(n) == 2 (mod 10) if n == {1,-1} (mod 6), a(n) == 7 (mod 10) if n == {2,-2} (mod 6), and a(n) == 6 (mod 10) if n == 3 (mod 6). So, the rightmost digits of a(n) form a repeating cycle of length 6: 1, 2, 7, 6, 7, 2. (End)
a(A298211(n)) = A002350(3*n^2). - A.H.M. Smeets, Jan 25 2018
(2 + sqrt(3))^n = a(n) + A001353(n)*sqrt(3), n >= 0; integers in the quadratic number field Q(sqrt(3)). - Wolfdieter Lang, Feb 16 2018
Yong Hao Ng has shown that for any n, a(n) is coprime with any member of A001834 and with any member of A001835. - René Gy, Feb 26 2018
Positive numbers k such that 3*(k-1)*(k+1) is a square. - Davide Rotondo, Oct 25 2020
a(n)*a(n+1)-1 = a(2*n+1)/2 = A001570(n) divides both a(n)^6+1 and a(n+1)^6+1. In other words, for k = a(2*n+1)/2, (k+1)^6 has divisors congruent to -1 modulo k (cf. A350916). - Max Alekseyev, Jan 23 2022

Examples

			2^6 - 1 = 63 does not divide a(2^4) = 708158977, therefore 63 is composite. 2^5 - 1 = 31 divides a(2^3) = 18817, therefore 31 is prime.
G.f. = 1 + 2*x + 7*x^2 + 26*x^3 + 97*x^4 + 362*x^5 + 1351*x^6 + 5042*x^7 + ...
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • Eugene McDonnell, "Heron's Rule and Integer-Area Triangles", Vector 12.3 (January 1996) pp. 133-142.
  • 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).
  • P.-F. Teilhet, Reply to Query 2094, L'Intermédiaire des Mathématiciens, 10 (1903), 235-238.

Crossrefs

Programs

  • Haskell
    a001075 n = a001075_list !! n
    a001075_list =
       1 : 2 : zipWith (-) (map (4 *) $ tail a001075_list) a001075_list
    -- Reinhard Zumkeller, Aug 11 2011
    
  • Magma
    I:=[1, 2]; [n le 2 select I[n] else 4*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 19 2017
  • Maple
    A001075 := proc(n)
        orthopoly[T](n,2) ;
    end proc:
    seq(A001075(n),n=0..30) ; # R. J. Mathar, Apr 14 2018
  • Mathematica
    Table[ Ceiling[(1/2)*(2 + Sqrt[3])^n], {n, 0, 24}]
    CoefficientList[Series[(1-2*x) / (1-4*x+x^2), {x, 0, 24}], x] (* Jean-François Alcover, Dec 21 2011, after Simon Plouffe *)
    LinearRecurrence[{4,-1},{1,2},30] (* Harvey P. Dale, Aug 22 2015 *)
    Round@Table[LucasL[2n, Sqrt[2]]/2, {n, 0, 20}] (* Vladimir Reshetnikov, Sep 15 2016 *)
    ChebyshevT[Range[0, 20], 2] (* Eric W. Weisstein, May 26 2017 *)
    a[ n_] := LucasL[2*n, x]/2 /. x->Sqrt[2]; (* Michael Somos, Sep 05 2022 *)
  • PARI
    {a(n) = subst(poltchebi(abs(n)), x, 2)};
    
  • PARI
    {a(n) = real((2 + quadgen(12))^abs(n))};
    
  • PARI
    {a(n) = polsym(1 - 4*x + x^2, abs(n))[1 + abs(n)]/2};
    
  • PARI
    a(n)=polchebyshev(n,1,2) \\ Charles R Greathouse IV, Nov 07 2016
    
  • PARI
    my(x='x+O('x^30)); Vec((1-2*x)/(1-4*x+x^2)) \\ G. C. Greubel, Dec 19 2017
    
  • SageMath
    [lucas_number2(n,4,1)/2 for n in range(0, 25)] # Zerinvary Lajos, May 14 2009
    
  • SageMath
    def a(n):
        Q = QuadraticField(3, 't')
        u = Q.units()[0]
        return (u^n).lift().coeffs()[0]  # Ralf Stephan, Jun 19 2014
    

Formula

G.f.: (1 - 2*x)/(1 - 4*x + x^2). - Simon Plouffe in his 1992 dissertation
E.g.f.: exp(2*x)*cosh(sqrt(3)*x).
a(n) = 4*a(n-1) - a(n-2) = a(-n).
a(n) = (S(n, 4) - S(n-2, 4))/2 = T(n, 2), with S(n, x) := U(n, x/2), S(-1, x) := 0, S(-2, x) := -1. U, resp. T, are Chebyshev's polynomials of the second, resp. first, kind. S(n-1, 4) = A001353(n), n >= 0. See A049310 and A053120.
a(n) = A001353(n+2) - 2*A001353(n+1).
a(n) = sqrt(1 + 3*A001353(n)) (cf. Richardson comment, Oct 10 2002).
a(n) = 2^(-n)*Sum_{k>=0} binomial(2*n, 2*k)*3^k = 2^(-n)*Sum_{k>=0} A086645(n, k)*3^k. - Philippe Deléham, Mar 01 2004
a(n) = ((2 + sqrt(3))^n + (2 - sqrt(3))^n)/2; a(n) = ceiling((1/2)*(2 + sqrt(3))^(n)).
a(n) = cosh(n * log(2 + sqrt(3))).
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2*k)*2^(n-2*k)*3^k. - Paul Barry, May 08 2003
a(n+2) = 2*a(n+1) + 3*Sum_{k>=0} a(n-k)*2^k. - Philippe Deléham, Mar 03 2004
a(n) = 2*a(n-1) + 3*A001353(n-1). - Lekraj Beedassy, Jul 21 2006
a(n) = left term of M^n * [1,0] where M = the 2 X 2 matrix [2,3; 1,2]. Right term = A001353(n). Example: a(4) = 97 since M^4 * [1,0] = [A001075(4), A001353(4)] = [97, 56]. - Gary W. Adamson, Dec 27 2006
Binomial transform of A026150: (1, 1, 4, 10, 28, 76, ...). - Gary W. Adamson, Nov 23 2007
First differences of A001571. - N. J. A. Sloane, Nov 03 2009
Sequence satisfies -3 = f(a(n), a(n+1)) where f(u, v) = u^2 + v^2 - 4*u*v. - Michael Somos, Sep 19 2008
a(n) = Sum_{k=0..n} A201730(n,k)*2^k. - Philippe Deléham, Dec 06 2011
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(3*k - 4)/(x*(3*k - 1) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 28 2013
a(n) = Sum_{k=0..n} A238731(n,k). - Philippe Deléham, Mar 05 2014
a(n) = (-1)^n*(A125905(n) + 2*A125905(n-1)), n > 0. - Franck Maminirina Ramaharo, Nov 11 2018
a(n) = (tan(Pi/12)^n + tan(5*Pi/12)^n)/2. - Greg Dresden, Oct 01 2020
From Peter Bala, Aug 17 2022: (Start)
a(n) = (1/2)^n * [x^n] ( 4*x + sqrt(1 + 12*x^2) )^n.
The g.f. A(x) satisfies A(2*x) = 1 + x*B'(x)/B(x), where B(x) = 1/sqrt(1 - 8*x + 4*x^2) is the g.f. of A069835.
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p >= 3 and positive integers n and k.
Sum_{n >= 1} 1/(a(n) - (3/2)/a(n)) = 1.
Sum_{n >= 1} (-1)^(n+1)/(a(n) + (1/2)/a(n)) = 1/3.
Sum_{n >= 1} 1/(a(n)^2 - 3/2) = 1 - 1/sqrt(3). (End)
a(n) = binomial(2*n, n) + 2*Sum_{k > 0} binomial(2*n, n+2*k)*cos(k*Pi/3). - Greg Dresden, Oct 11 2022
2*a(n) + 2^n = 3*Sum_{k=-n..n} (-1)^k*binomial(2*n, n+6*k). - Greg Dresden, Feb 07 2023

Extensions

More terms from James Sellers, Jul 10 2000
Chebyshev comments from Wolfdieter Lang, Oct 31 2002

A033313 Smallest positive integer x satisfying the Pell equation x^2 - D*y^2 = 1 for nonsquare D and positive y.

Original entry on oeis.org

3, 2, 9, 5, 8, 3, 19, 10, 7, 649, 15, 4, 33, 17, 170, 9, 55, 197, 24, 5, 51, 26, 127, 9801, 11, 1520, 17, 23, 35, 6, 73, 37, 25, 19, 2049, 13, 3482, 199, 161, 24335, 48, 7, 99, 50, 649, 66249, 485, 89, 15, 151, 19603, 530, 31, 1766319049, 63, 8, 129, 65, 48842, 33
Offset: 1

Views

Author

Keywords

Crossrefs

See A033317 (for y's).

Programs

  • Maple
    F:= proc(d) local r,Q; uses numtheory;
      Q:= cfrac(sqrt(d),'periodic','quotients'):
      r:= nops(Q[2]);
      if r::odd then
        numer(cfrac([op(Q[1]),op(Q[2]),op(Q[2][1..-2])]))
      else
        numer(cfrac([op(Q[1]),op(Q[2][1..-2])]));
      fi
    end proc:
    map(F, remove(issqr,[$1..100])); # Robert Israel, May 17 2015
  • Mathematica
    PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[Sqrt[m]]; n = Length[Last[cf]]; If[n == 0, Return[{}]]; If[OddQ[n], n = 2n]; s = FromContinuedFraction[ContinuedFraction[Sqrt[m], n]]; {Numerator[s], Denominator[s]}];
    A033313 = DeleteCases[PellSolve /@ Range[100], {}][[All, 1]] (* Jean-François Alcover, Nov 21 2020, after N. J. A. Sloane in A002350 *)
    Table[If[! IntegerQ[Sqrt[k]], {k,FindInstance[x^2 - k*y^2 == 1 && x > 0 && y > 0, {x, y},Integers]}, Nothing], {k, 2, 80}][[All, 2, 1, 1, 2]] (* Horst H. Manninger, Mar 28 2021 *)

Formula

a(n) = sqrt(1 + A000037(n)*A033317(n)^2), or
a(n) = sqrt(1 + (n + floor(1/2 + sqrt(n)))*A033317(n)^2). - Zak Seidov, Oct 24 2013

Extensions

Offset switched to 1 by R. J. Mathar, Sep 21 2009
Name corrected by Wolfdieter Lang, Sep 03 2015

A033316 Value of D for incrementally largest values of minimal x satisfying Pell equation x^2-Dy^2=1.

Original entry on oeis.org

1, 2, 5, 10, 13, 29, 46, 53, 61, 109, 181, 277, 397, 409, 421, 541, 661, 1021, 1069, 1381, 1549, 1621, 2389, 3061, 3469, 4621, 4789, 4909, 5581, 6301, 6829, 8269, 8941, 9949, 12541, 13381, 16069, 17341, 24049, 24229, 25309, 29269, 30781, 32341, 36061
Offset: 1

Views

Author

Keywords

Comments

Equally, value of D for incrementally largest values of minimal y satisfying Pell equation x^2-Dy^2=1.
Values of n where A002349 (or A002350) sets a new record.

Crossrefs

Programs

  • Mathematica
    PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[ Sqrt[m]]; n = Length[ Last[cf]]; If[ OddQ[n], n = 2*n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[m], n]]; {Numerator[s], Denominator[s]}]; f[n_] := If[ !IntegerQ[ Sqrt[n]], PellSolve[n][[1]], 1]; a = b = -1; t = {}; Do[b = f[n]; If[b > a, t = Append[t, n]; a = b], {n, 1, 40500}]; t

Extensions

More terms from Robert G. Wilson v, Apr 15 2003

A033315 Incrementally largest values of minimal x satisfying Pell equation x^2 - D*y^2 = 1.

Original entry on oeis.org

1, 3, 9, 19, 649, 9801, 24335, 66249, 1766319049, 158070671986249, 2469645423824185801, 159150073798980475849, 838721786045180184649, 25052977273092427986049, 3879474045914926879468217167061449
Offset: 1

Views

Author

Keywords

Crossrefs

Records in A033313 (or A002350).
Cf. A033316 (corresponding values of D).

Programs

  • Mathematica
    PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[Sqrt[m]]; n = Length[Last[cf]]; If[n == 0, Return[{}]]; If[OddQ[n], n = 2 n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[m], n]]; {Numerator[s], Denominator[s]}];
    xx = DeleteCases[PellSolve /@ Range[10^5], {}][[All, 1]];
    Reap[Module[{x, record = 0}, Sow[1]; For[i = 1, i <= Length@xx, i++, x = xx[[i]]; If[x > record, record = x; Sow[x]]]]][[2, 1]] (* Jean-François Alcover, Nov 21 2020, after N. J. A. Sloane in A002349 *)

A076445 The smaller of a pair of powerful numbers (A001694) that differ by 2.

Original entry on oeis.org

25, 70225, 130576327, 189750625, 512706121225, 13837575261123, 99612037019889, 1385331749802025, 3743165875258953025, 10114032809617941274225, 8905398244301708746029223, 27328112908421802064005625, 73840550964522899559001927225
Offset: 1

Views

Author

Jud McCranie, Oct 15 2002

Keywords

Comments

Erdos conjectured that there aren't three consecutive powerful numbers and no examples are known. There are an infinite number of powerful numbers differing by 1 (cf. A060355). A requirement for three consecutive powerful numbers is a pair that differ by 2 (necessarily odd). These pairs are much more rare.
Sentance gives a method for constructing families of these numbers from the solutions of Pell equations x^2-my^2=1 for certain m whose square root has a particularly simple form as a continued fraction. Sentance's result can be generalized to any m such that A002350(m) is even. These m, which generate all consecutive odd powerful numbers, are in A118894. - T. D. Noe, May 04 2006

Examples

			25=5^2 and 27=3^3 are powerful numbers differing by 2, so 25 is in the sequence.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, B16

Crossrefs

Extensions

a(8)-a(10) from Geoffrey Reynolds (geoff(AT)hisplace.co.nz), Feb 15 2005
More terms from T. D. Noe, May 04 2006

A068310 n^2 - 1 divided by its largest square divisor.

Original entry on oeis.org

3, 2, 15, 6, 35, 3, 7, 5, 11, 30, 143, 42, 195, 14, 255, 2, 323, 10, 399, 110, 483, 33, 23, 39, 3, 182, 87, 210, 899, 15, 1023, 17, 1155, 34, 1295, 38, 1443, 95, 1599, 105, 1763, 462, 215, 506, 235, 138, 47, 6, 51, 26, 2703, 78, 2915, 21, 3135, 203, 3363, 870, 3599
Offset: 2

Views

Author

Lekraj Beedassy, Feb 25 2002

Keywords

Comments

In other words, squarefree part of n^2-1.
Least m for which x^2 - m*y^2 = 1 has a solution with x = n.

Examples

			a(6) = 35, as 6^2 - 1 = 35 itself is squarefree.
7^2-1 = 48 = A005563(6), whose largest square divisor is A008833(48) = 16, so a(7) = 48/16 = 3.
		

Crossrefs

Programs

  • Haskell
    a068310 n = f 1 $ a027746_row (n^2 - 1) where
       f y [] = y
       f y [p] = y*p
       f y (p:ps'@(p':ps)) | p == p' = f y ps
                           | otherwise = f (y*p) ps'
    -- Reinhard Zumkeller, Nov 26 2011
  • Mathematica
    a[n_] := Times@@(#[[1]] ^ Mod[ #[[2]], 2]&/@FactorInteger[n^2-1])
    Table[(n^2-1)/Max[Select[Divisors[n^2-1],IntegerQ[Sqrt[#]]&]],{n,2,60}] (* Harvey P. Dale, Dec 08 2019 *)
  • PARI
    a(n) = core(n*n - 1); \\ David Wasserman, Mar 07 2005
    

Formula

a(n) = A007913(n^2-1).
a(n) = A005563(n-1) / A008833(n^2 - 1). - Reinhard Zumkeller, Nov 26 2011; corrected by Georg Fischer, Dec 10 2022

Extensions

Edited by Dean Hickerson, Mar 19 2002
Entry revised by N. J. A. Sloane, Apr 27 2007

A081233 Let p = n-th prime, take smallest solution (x,y) to the Pellian equation x^2 - p*y^2 = 1 with x and y >= 1; sequence gives value of x.

Original entry on oeis.org

3, 2, 9, 8, 10, 649, 33, 170, 24, 9801, 1520, 73, 2049, 3482, 48, 66249, 530, 1766319049, 48842, 3480, 2281249, 80, 82, 500001, 62809633, 201, 227528, 962, 158070671986249, 1204353, 4730624, 10610, 6083073, 77563250, 25801741449
Offset: 1

Views

Author

N. J. A. Sloane, Apr 18 2003

Keywords

Crossrefs

Values of y are in A081234. Equals A002350(p). Cf. A082393.

Programs

  • Mathematica
    PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[ Sqrt[m]]; n = Length[Last[cf]]; If[OddQ[n], n = 2*n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[m], n]]; {Numerator[s], Denominator[s]}]; Table[ PellSolve[ Prime[n]][[1]], {n, 35}] (* Robert G. Wilson v, Jul 22 2005 *)
    f[n_] := Block[{p = Prime[n]}, FindInstance[x^2 == p*y^2 + 1 && x > 0 && y > 0, {x, y}, Integers][[1, 1, 2]]]; Array[f, 40] (* Robert G. Wilson v, Nov 16 2012 *)

Extensions

a(8) - a(35) from Robert G. Wilson v, Jul 22 2005

A298210 Smallest n such that A001542(a(n)) == 0 (mod n), i.e., x=A001541(a(n)) and y=A001542(a(n)) is the fundamental solution of the Pell equation x^2 - 2*(n*y)^2 = 1.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 3, 4, 6, 3, 6, 2, 7, 3, 6, 8, 4, 6, 10, 6, 6, 6, 11, 4, 15, 7, 18, 6, 5, 6, 15, 16, 6, 4, 3, 6, 19, 10, 14, 12, 5, 6, 22, 6, 6, 11, 23, 8, 21, 15, 4, 14, 27, 18, 6, 12, 10, 5, 10, 6, 31, 15, 6, 32, 21, 6, 34, 4, 22, 3, 35, 12, 18, 19, 30
Offset: 1

Views

Author

A.H.M. Smeets, Jan 15 2018

Keywords

Comments

The fundamental solution of the Pell equation x^2 - 2*(n*y)^2 = 1, is the smallest solution of x^2 - 2*y^2 = 1 satisfying y == 0 (mod n).
If n is prime (i.e., n in A000040) then a(n) divides (n - Legendre symbol (n/2)); the Legendre symbol (n/2), or more general Kronecker symbol (n/2) is A091337(n). - A.H.M. Smeets, Jan 23 2018
From A.H.M. Smeets, Jan 23 2018: (Start)
Stronger, but conjectured:
If n is prime (i.e., in A000040) and n in {2,3,5,7,11,13,19,23} (mod 24) then (n - Legendre symbol (n/2)) / a(n) == 2 (mod 4).
If n is a safe prime (i.e., in A005385) and n in {7,23} (mod 24) then (n - Legendre symbol (n/2)) / a(n) = 2, i.e., a(n) is a Sophie Germain prime (A005384).
If n is prime (i.e., in A000040) and n in {1,17} (mod 24) then (n - Legendre symbol (n/2)) / a(n) == 0 (mod 4). (End)

References

  • Michael J. Jacobson, Jr. and Hugh C. Williams, Solving the Pell Equation, Springer, 2009, pages 1-17.

Crossrefs

Programs

  • Mathematica
    b[n_] := b[n] = Switch[n, 0, 0, 1, 2, _, 6 b[n - 1] - b[n - 2]];
    a[n_] := For[k = 1, True, k++, If[Mod[b[k], n] == 0, Return[k]]];
    a /@ Range[100] (* Jean-François Alcover, Nov 16 2019 *)
  • Python
    xf, yf = 3, 2
    x, n = 2*xf, 0
    while n < 20000:
        n = n+1
        y1, y0, i = 0, yf, 1
        while y0%n != 0:
            y1, y0, i = y0, x*y0-y1, i+1
        print(n, i)

Formula

a(n) <= A000010(n) < n. - A.H.M. Smeets, Jan 23 2018
A001541(a(n)) = A002350(2*n^2).
A001542(a(n)) = A002349(2*n^2).
if n | m then a(n) | a(m).
a(2^(m+1)) = 2^m for m>=0.
Showing 1-10 of 29 results. Next