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.

A010121 Continued fraction for sqrt(7).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is a basic member of a family of 4-periodic multiplicative sequences with two parameters (c1,c2), defined for n >= 1 by a(n)=1 if n is odd, a(n)=c1 if n == 0 (mod 4) and a(n)=c2 if n == 2 (mod 4). Here, (c1,c2)=(4,1).
The Dirichlet generating function is (1+(c2-1)/2^s+(c1-c2)/4^s)*zeta(s).
Other members are A010123 with parameters (6,2), A010127 (8,3), A010130 (10,1), A010131 (10,2), A010132 (10,4), A010137 (12,5), A010146 (14,6), A089146 (4,8), A109008 (4,2), A112132 (7,3). If c1=c2, this reduces to the cases discussed in A040001. - R. J. Mathar, Feb 18 2011

Examples

			2.645751311064590590501615753...  = A010465 = 2 + 1/(1 + 1/(1 + 1/(1 + 1/(4 + ...)))).
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A010465 (decimal expansion).

Programs

  • Mathematica
    ContinuedFraction[Sqrt[7],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
    CoefficientList[Series[(2 x^2 + 3 x + 2) (x^2 - x + 1) / ((1 - x) (1 + x) (x^2 + 1)), {x, 0, 100}], x] (* Vincenzo Librandi, Nov 26 2016 *)
    PadRight[{2},120,{4,1,1,1}] (* Harvey P. Dale, Nov 30 2019 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 13000); x=contfrac(sqrt(7)); for (n=0, 20000, write("b010121.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 01 2009

Formula

From R. J. Mathar, Jun 17 2009: (Start)
G.f.: -(2*x^2+3*x+2)*(x^2-x+1)/((x-1)*(1+x)*(x^2+1)).
a(n) = a(n-4), n > 4. (End)
a(n) = (7 + 3*(-1)^n + 3*(-i)^n + 3*i^n)/4, n > 0, where i is the imaginary unit. - Bruno Berselli, Feb 18 2011

A010479 Decimal expansion of square root of 23.

Original entry on oeis.org

4, 7, 9, 5, 8, 3, 1, 5, 2, 3, 3, 1, 2, 7, 1, 9, 5, 4, 1, 5, 9, 7, 4, 3, 8, 0, 6, 4, 1, 6, 2, 6, 9, 3, 9, 1, 9, 9, 9, 6, 7, 0, 7, 0, 4, 1, 9, 0, 4, 1, 2, 9, 3, 4, 6, 4, 8, 5, 3, 0, 9, 1, 1, 4, 4, 4, 8, 2, 5, 7, 2, 3, 5, 9, 0, 7, 4, 6, 4, 0, 8, 2, 4, 9, 2, 1, 9, 1, 4, 4, 6, 4, 3, 6, 9, 1, 8, 8, 6
Offset: 1

Views

Author

Keywords

Comments

Continued fraction expansion is 4 followed by {1, 3, 1, 8} repeated. - Harry J. Smith, Jun 03 2009

Examples

			4.7958315233127195415974380641626939199967070419041293464853...
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 275.

Crossrefs

Cf. A010127 (continued fraction).

Programs

  • Mathematica
    RealDigits[N[Sqrt[23], 200]][[1]] (* Vladimir Joseph Stephan Orlovsky, Feb 22 2011 *)
  • PARI
    default(realprecision, 20080); x=sqrt(23); for (n=1, 20000, d=floor(x); x=(x-d)*10; write("b010479.txt", n, " ", d));  \\ Harry J. Smith, Jun 03 2009

A307530 Primes p for which the continued fraction expansion of sqrt(p) has a single 1 starting at second position.

Original entry on oeis.org

3, 23, 47, 59, 61, 79, 97, 137, 139, 163, 167, 191, 193, 223, 251, 281, 283, 313, 317, 349, 353, 359, 389, 397, 431, 433, 439, 479, 521, 523, 563, 569, 571, 613, 617, 619, 659, 661, 673, 719, 727, 769, 773, 823, 827, 829, 839, 881, 883, 887, 941, 947, 953, 1009
Offset: 1

Views

Author

Michel Marcus, Apr 13 2019

Keywords

Comments

Misak and Ulas prove that the density of primes with k ones is 1/(Fibonacci(k+3)*Fibonacci(k+1)) = 1/3, here with k=1 (a single 1).

Examples

			For p = 3,  we have [1; 1, 2, ...]; see A040001.
For p = 27, we have [4; 1, 3, ...]; see A010127.
For p = 47, we have [6; 1, 5, ...]; see A010137.
		

Crossrefs

Programs

  • PARI
    isok(p) = my(cf = contfrac(sqrt(p))); (cf[2] == 1) && (cf[3] != 1);
    lista(nn) = forprime(p=2, nn, if (isok(p), print1(p, ", ")));
Showing 1-3 of 3 results.