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.

Previous Showing 11-20 of 21 results. Next

A244013 Denominators of rational approximations to sqrt(7) obtained from Newton's method.

Original entry on oeis.org

1, 4, 88, 41008, 8898489952, 418997705236253480128, 928971316248341903257187589777603944778112, 4566501711345281867283814391125123371716411674583075407993026856131137508750543524608
Offset: 0

Views

Author

N. J. A. Sloane, Jun 18 2014

Keywords

Examples

			2, 11/4, 233/88, 108497/41008, 23543191457/8898489952, ...
		

Crossrefs

Cf. A244012 (numerators).
The analogs for sqrt(k), k=2,3,5,6,7 are: A001601/A051009, A002812/A071579, A081459/A081460, A244014/A244015, A244012/A244013.

Programs

  • Maple
    N:=7;
    s:=[floor(sqrt(N))];
    M:=8;
    for n from 1 to M do
    x:=s[n];
    h:=(N-x^2)/(2*x);
    s:=[op(s),x+h]; od:
    lprint(s);
    s1:=map(numer,s);
    s2:=map(denom,s);

A244014 Numerators of rational approximations to sqrt(6) obtained from Newton's method.

Original entry on oeis.org

2, 5, 49, 4801, 46099201, 4250272665676801, 36129635465198759610694779187201, 2610701117696295981568349760414651575095962187244375364404428801
Offset: 0

Views

Author

N. J. A. Sloane, Jun 18 2014

Keywords

Examples

			2, 5/2, 49/20, 4801/1960, 46099201/18819920, ...
		

Crossrefs

The analogs for sqrt(k), k=2,3,5,6,7 are: A001601/A051009, A002812/A071579, A081459/A081460, A244014/A244015, A244012/A244013.

Programs

  • Maple
    N:=6;
    s:=[floor(sqrt(N))];
    M:=8;
    for n from 1 to M do
    x:=s[n];
    h:=(N-x^2)/(2*x);
    s:=[op(s),x+h]; od:
    lprint(s);
    s1:=map(numer,s);
    s2:=map(denom,s);

A244015 Denominators of rational approximations to sqrt(6) obtained from Newton's method.

Original entry on oeis.org

1, 2, 20, 1960, 18819920, 1735166549767840, 14749861913749949808286047759680, 1065814268211609269094400465471990022332221793124358274759711360
Offset: 0

Views

Author

N. J. A. Sloane, Jun 18 2014

Keywords

Examples

			2, 5/2, 49/20, 4801/1960, 46099201/18819920, ...
		

Crossrefs

Cf. A244014 (numerators).
The analogs for sqrt(k), k=2,3,5,6,7 are: A001601/A051009, A002812/A071579, A081459/A081460, A244014/A244015, A244012/A244013.

Programs

  • Magma
    m:=9; f:=[n eq 1 select 2 else (Self(n-1)+6/Self(n-1))/2: n in [1..m]]; [Denominator(f[n]): n in [1..m]]; // Vincenzo Librandi, Jan 12 2016
  • Maple
    N:=6;
    s:=[floor(sqrt(N))];
    M:=8;
    for n from 1 to M do
    x:=s[n];
    h:=(N-x^2)/(2*x);
    s:=[op(s),x+h]; od:
    lprint(s);
    s1:=map(numer,s);
    s2:=map(denom,s);

A145505 a(n+1)=a(n)^2+2*a(n)-2 and a(1)=5.

Original entry on oeis.org

5, 33, 1153, 1331713, 1773462177793, 3145168096065837266706433, 9892082352510403757550172975146702122837936996353
Offset: 1

Views

Author

Artur Jasinski, Oct 11 2008

Keywords

Comments

General formula for a(n+1)=a(n)^2+2*a(n)-2 and a(1)=k+1 is a(n)=Floor[((k + Sqrt[k^2 + 4])/2)^(2^((n+1) - 1))

Crossrefs

Programs

  • Mathematica
    aa = {}; k = 5; Do[AppendTo[aa, k]; k = k^2 + 2 k - 2, {n, 1, 10}]; aa
    or
    k =4; Table[Floor[((k + Sqrt[k^2 + 4])/2)^(2^(n - 1))], {n, 2, 7}] (*Artur Jasinski*)
    NestList[#^2+2#-2&,5,7]  (* Harvey P. Dale, Mar 19 2011 *)

Formula

From Peter Bala, Nov 12 2012: (Start)
a(n) = alpha^(2^(n-1)) + (1/alpha)^(2^(n-1)) - 1, where alpha := 3 + 2*sqrt(2).
a(n) = (1 + sqrt(2))^(2^n) + (sqrt(2) - 1)^(2^n) - 1.
a(n) = A003423(n-1) - 1. a(n) = 2*A001601(n) - 1. a(n) = 4*A190840(n-1) + 1.
Recurrence: a(n) = 7*{product {k = 1..n-1} a(k)} - 2 with a(1) = 5.
Product {n = 1..inf} (1 + 1/a(n)) = 7/8*sqrt(2).
Product {n = 1..inf} (1 + 2/(a(n) + 1)) = sqrt(2).
(End)

A007759 Knopfmacher expansion of sqrt(2): a(2n) = 2*(a(2n-1) + 1)^2 - 1, a(2n+1) = 2*(a(2n)^2 - 1).

Original entry on oeis.org

2, 17, 576, 665857, 886731088896, 1572584048032918633353217, 4946041176255201878775086487573351061418968498176, 48926646634423881954586808839856694558492182258668537145547700898547222910968507268117381704646657
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A002193 (sqrt(2)), A001601.

Programs

  • Magma
    function a(n)
      if n eq 1 then return 2;
      elif n mod 2 eq 0 then return 2*(a(n-1) +1)^2 -1;
      else return 2*(a(n-1)^2 -1);
      end if; return a; end function;
    [a(n): n in [1..9]]; // G. C. Greubel, Mar 04 2020
    
  • Maple
    a:= proc(n) option remember;
    if n=1 then 2
    elif `mod`(n,2) = 0 then 2*(a(n-1) +1)^2 -1
    else 2*(a(n-1)^2 -1)
    end if; end proc;
    seq(a(n), n = 1..9); # G. C. Greubel, Mar 04 2020
  • Mathematica
    a[n_]:= a[n]= If[n==1, 2, If[EvenQ[n], 2*(a[n-1] +1)^2 -1, 2*a[n-1]^2 -2]]; Table[a[n], {n,9}] (* G. C. Greubel, Mar 04 2020 *)
  • PARI
    a(n) = if (n==1, 2, if (n % 2, 2*a(n-1)^2 - 2, 2*(a(n-1)+1)^2 - 1)); \\ Michel Marcus, Feb 20 2019
    
  • Sage
    @CachedFunction
    def a(n):
        if (n==1): return 2
        elif (n%2==0): return 2*(a(n-1) +1)^2 -1
        else: return 2*(a(n-1)^2 -1)
    [a(n) for n in (1..9)] # G. C. Greubel, Mar 04 2020

Extensions

More terms from Christian G. Bower, Jan 06 2006

A257553 Primes whose squares are not the sums of two consecutive nonsquares.

Original entry on oeis.org

2, 3, 7, 17, 41, 239, 577, 665857, 9369319, 63018038201, 489133282872437279, 19175002942688032928599, 123426017006182806728593424683999798008235734137469123231828679
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 29 2015

Keywords

Comments

Primes of the form A257282(k).
2 is in this sequence, and an odd prime p is in the sequence iff either (p^2 - 1)/2 or (p^2 + 1)/2 is a square. - Wolfdieter Lang, May 07 2015
According to the Neretin comment in A257282, and as the primes of A001333 are in A086395, this is (apart from the 2) the same as A086395. - R. J. Mathar, Jan 31 2024

Examples

			2 is in the sequence because it is prime and its square 4 is in A256944: 4 is not a sum of consecutive numbers.
3 is in the sequence because it is prime and its square 9 is in A256944: 9 = 2^2 + 5.
7 is in the sequence because it is prime and its square 49 is in A256944: 49 = 24 + 5^2.
5 is not in the sequence because neither 12 nor 13 is a square.
		

Crossrefs

Programs

  • Mathematica
    lim = 1000000; s = Plus @@@ (Partition[#, 2, 1] & @ Complement[Range@ lim, Range[Floor@ Sqrt[lim]]^2]); Select[Sqrt[#] & /@ Select[Range@ Floor[Sqrt[lim]]^2, ! MemberQ[s, #] &] , PrimeQ] (* Michael De Vlieger, Apr 29 2015 *)

Extensions

Name clarified by Michael De Vlieger and Jon E. Schoenfield, May 03 2015
Edited by Wolfdieter Lang, May 07 2015

A152121 a(0) = 4; for n>0, a(n) = a(n-1)^2 - 2^(1+2^(n-1)).

Original entry on oeis.org

4, 12, 136, 18464, 340918784, 116225617283907584, 13508394113025357323362163662782464, 182476711512818130204254420972394401125552102555370860811711166808064
Offset: 0

Views

Author

Dennis Martin (dennis.martin(AT)dptechnology.com), Nov 24 2008

Keywords

Comments

A subset of A056236, where a(n) = (2+sqrt(2))^n+(2-sqrt(2))^n, when the exponent n is a nonnegative integer power of 2. I.E.: a(0) = (2+sqrt(2))^(2^0)+(2-sqrt(2))^(2^0), a(1) = (2+sqrt(2))^(2^1)+(2-sqrt(2))^(2^1); a(2) = (2+sqrt(2))^(2^2)+(2-sqrt(2))^(2^2); etc.
For all n the value 2^(n+1) can be factored from each a(n), which except for a different initial term (a(0) = 2 instead of a(0) = 1) matches the sequence A001601 for n>0.

Examples

			a(0) = 4; a(1) = 4^2 - 2^2 = 12; a(2) = 12^2 - 2^3 = 136; a(3) = 136^2 - 2^5 = 18464; a(4) = 18464^2 - 2^9 = 340918784.
		

Crossrefs

Formula

a(n) = a(n-1)^2 - 2^(1+2^(n-1))

A163261 Numerators of fractions in the approximation of the square root of 2 by means of: f(n)= 3f(n-1)/(f(n-1)^2+1); with f(1)= 1.

Original entry on oeis.org

1, 3, 18, 702, 1038258, 2292015792222, 11135478955084481409955218, 263108590829588406010634295716681354685770554450302
Offset: 1

Views

Author

Mark Dols, Jul 23 2009

Keywords

Comments

For root c: f(n) = (1+c)*f(n-1)/(f(n-1)^2+1).

Crossrefs

Cf. A002193 (sqrt(2)), A163262 (denominators).
Cf. A001601 and A051009: Newton's method.

Programs

  • PARI
    f(n) = if (n==1, 1, 3*f(n-1)/(f(n-1)^2+1));
    a(n) = numerator(f(n)); \\ Michel Marcus, Mar 05 2019

Formula

a(n+1) = 3*a(n)*A163262(n). - Philippe Deléham, Oct 11 2011

Extensions

More terms from Michel Marcus, Mar 05 2019

A163262 Denominators of fractions in the approximation of the square root of 2 by means of: f(n) = 3*f(n-1)/(f(n-1)^2+1); with f(1)= 1.

Original entry on oeis.org

1, 2, 13, 493, 735853, 1619459312173, 7875984855578888541679213, 186030029004437379749629399827828117533654561726893
Offset: 1

Views

Author

Mark Dols, Jul 23 2009

Keywords

Comments

For root of c: f(n) = (1+c)*f(n-1)/(f(n-1)^2+1).
a(9) has 102 digits. - Emeric Deutsch, Jul 29 2009

Crossrefs

Cf. A002193 (sqrt(2)), A163261 (numerators).
Cf. A001601 and A051009: Newton's method.

Programs

  • Maple
    f[1] := 1: for n from 2 to 10 do f[n] := 3*f[n-1]/(1+f[n-1]^2) end do: seq(denom(f[n]), n = 1 .. 8); # Emeric Deutsch, Jul 29 2009
  • PARI
    f(n) = if (n==1, 1, 3*f(n-1)/(f(n-1)^2+1));
    a(n) = denominator(f(n)); \\ Michel Marcus, Mar 04 2019

Extensions

a(7) and a(8) from Emeric Deutsch, Jul 29 2009
Name edited by Michel Marcus, Mar 04 2019

A190840 a(n+1) = 4*a(n)*(a(n)+1) for a(0) = 1.

Original entry on oeis.org

1, 8, 288, 332928, 443365544448, 786292024016459316676608, 2473020588127600939387543243786675530709484249088
Offset: 0

Views

Author

Alexander Zhukov, Aug 08 2011

Keywords

Comments

For n>0, subsequence of A132592: both a(n)/2 and a(n)+1 are squares.
All terms (n > 0) are divisible by 8, yielding all terms of A185097, which is indexed from n=1, thus having the first term A185097(1) = 1.
The next term has 98 digits. - Harvey P. Dale, Jan 01 2014
For n>0, subsequence of A060355: both a(n) and a(n)+1 are powerful numbers. - Bernard Schott, Apr 24 2023

Crossrefs

Programs

  • Mathematica
    NestList[4#(#+1)&,1,7] (* Harvey P. Dale, Jan 01 2014 *)

Formula

a(n+1) = 4*a(n)*(a(n)+1) for a(0) = 1.
a(n) = sinh(2^(n-2)*arccosh(17))^2. - Alexander R. Povolotsky, Aug 14 2011
a(n) = 8*A185097(n) for n > 0. - Alexander R. Povolotsky, Aug 14 2011
a(n) = (1 + sqrt(2))^(2^(n+1))/4 + (1 - sqrt(2))^(2^(n+1))/4 - 1/2. Therefore 2*a(n) + 1 = A001601(n+1). - Bruno Berselli, Feb 01 2017
Previous Showing 11-20 of 21 results. Next