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.

A040001 1 followed by {1, 2} repeated.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Continued fraction for sqrt(3).
Also coefficient of the highest power of q in the expansion of the polynomial nu(n) defined by: nu(0)=1, nu(1)=b and for n>=2, nu(n)=b*nu(n-1)+lambda*(n-1)_q*nu(n-2) with (b,lambda)=(1,1), where (n)_q=(1+q+...+q^(n-1)) and q is a root of unity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002
nu(0)=1 nu(1)=1; nu(2)=2; nu(3)=3+q; nu(4)=5+3q+2q^2; nu(5)=8+7q+6q^2+4q^3+q^4; nu(6)=13+15q+16q^2+14q^3+11q^4+5q^5+2q^6.
From Jaroslav Krizek, May 28 2010: (Start)
a(n) = denominators of arithmetic means of the first n positive integers for n >= 1.
See A026741(n+1) or A145051(n) - denominators of arithmetic means of the first n positive integers. (End)
From R. J. Mathar, Feb 16 2011: (Start)
This is a prototype of multiplicative sequences defined by a(p^e)=1 for odd primes p, and a(2^e)=c with some constant c, here c=2. They have Dirichlet generating functions (1+(c-1)/2^s)*zeta(s).
Examples are A153284, A176040 (c=3), A040005 (c=4), A021070, A176260 (c=5), A040011, A176355 (c=6), A176415 (c=7), A040019, A021059 (c=8), A040029 (c=10), A040041 (c=12). (End)
a(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = A000325(k) for k = 0, 1, ..., n. - Michael Somos, May 12 2012
For n > 0: denominators of row sums of the triangular enumeration of rational numbers A226314(n,k) / A054531(n,k), 1 <= k <= n; see A226555 for numerators. - Reinhard Zumkeller, Jun 10 2013
From Jianing Song, Nov 01 2022: (Start)
For n > 0, a(n) is the minimal gap of distinct numbers coprime to n. Proof: denote the minimal gap by b(n). For odd n we have A058026(n) > 0, hence b(n) = 1. For even n, since 1 and -1 are both coprime to n we have b(n) <= 2, and that b(n) >= 2 is obvious.
The maximal gap is given by A048669. (End)

Examples

			1.732050807568877293527446341... = 1 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...))))
G.f. = 1 + x + 2*x^2 + x^3 + 2*x^4 + x^5 + 2*x^6 + x^7 + 2*x^8 + x^9 + ...
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.4 Powers and Roots, p. 144.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A000034, A002194, A133566, A083329 (binomial Transf).
Apart from a(0) the same as A134451.

Programs

  • Haskell
    a040001 0 = 1; a040001 n = 2 - mod n 2
    a040001_list = 1 : cycle [1, 2]  -- Reinhard Zumkeller, Apr 16 2015
  • Maple
    Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[3],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
    PadRight[{1},120,{2,1}] (* Harvey P. Dale, Nov 26 2015 *)
  • PARI
    {a(n) = 2 - (n==0) - (n%2)} /* Michael Somos, Jun 11 2003 */
    
  • PARI
    { allocatemem(932245000); default(realprecision, 12000); x=contfrac(sqrt(3)); for (n=0, 20000, write("b040001.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 01 2009
    

Formula

Multiplicative with a(p^e) = 2 if p even; 1 if p odd. - David W. Wilson, Aug 01 2001
G.f.: (1 + x + x^2) / (1 - x^2). E.g.f.: (3*exp(x)-2*exp(0)+exp(-x))/2. - Paul Barry, Apr 27 2003
a(n) = (3-2*0^n +(-1)^n)/2. a(-n)=a(n). a(2n+1)=1, a(2n)=2, n nonzero.
a(n) = sum{k=0..n, F(n-k+1)*(-2+(1+(-1)^k)/2+C(2, k)+0^k)}. - Paul Barry, Jun 22 2007
Row sums of triangle A133566. - Gary W. Adamson, Sep 16 2007
Euler transform of length 3 sequence [ 1, 1, -1]. - Michael Somos, Aug 04 2009
Moebius transform is length 2 sequence [ 1, 1]. - Michael Somos, Aug 04 2009
a(n) = sign(n) + ((n+1) mod 2) = 1 + sign(n) - (n mod 2). - Wesley Ivan Hurt, Dec 13 2013

A010490 Decimal expansion of square root of 35.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Continued fraction expansion is 5 followed by {1, 10} repeated. - Harry J. Smith, Jun 04 2009
This is the length of the long leg of a right triangle with hypotenuse 6 and short leg 1. So this is half the length of the longest line segment that can be drawn within a circular ring with radii 6 and 1. - Michel Marcus, Jun 20 2020

Examples

			5.916079783099616042567328291561617048415501230794340322879719669142822...
		

References

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

Crossrefs

Cf. A040029 (continued fraction), A010606 (cube root of 35).

Programs

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

A013648 Numbers k such that the periodic part of the continued fraction for sqrt(k) contains a single 1.

Original entry on oeis.org

3, 8, 15, 24, 35, 48, 63, 80, 99, 120, 143, 168, 175, 176, 195, 208, 224, 255, 288, 323, 360, 399, 440, 483, 528, 551, 575, 624, 675, 728, 783, 799, 840, 899, 960, 1023, 1035, 1088, 1155, 1224, 1247, 1295, 1368, 1403, 1443, 1520, 1599, 1680, 1763, 1848, 1872
Offset: 1

Views

Author

Keywords

Comments

All the terms of A005563 are here, as well as some additional terms (with even period > 2 and the digit 1 in central position) (e.g., sqrt(175) = [13,'4, 2, 1, 2, 4, 26']).

References

  • Kenneth H. Rosen, Elementary Number Theory and Its Applications, Addison-Wesley, 1984, page 426 (but beware of errors!).

Crossrefs

Programs

  • Mathematica
    Select[ Range@ 1900, !IntegerQ[ Sqrt@ #] && Count[ ContinuedFraction[ Sqrt@ #][[2]], 1] == 1 &] (* Robert G. Wilson v, Jul 03 2011 *)

Extensions

Additional comments from Francisco Salinas (franciscodesalinas(AT)hotmail.com), Dec 30 2001
Incorrect formulas and programs removed by R. J. Mathar, Jan 06 2011
Showing 1-3 of 3 results.