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

A010502 Decimal expansion of square root of 48.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

sqrt(48)/10 is the area enclosed by Koch's fractal snowflake based on unit-sided equilateral triangle (actually 8/5 times the latter's area). - Lekraj Beedassy, Jan 06 2005
7+sqrt(48) is the ratio of outer to inner Soddy circles' radii for three identical kissing circles (see Soddy circles link). - Lekraj Beedassy, Feb 14 2006
Continued fraction expansion is 6 followed by {1, 12} repeated. - Harry J. Smith, Jun 06 2009
Let a, b, c the sides of a triangle ABC of area S, then 4*sqrt(3) <= (a^2+b^2+c^2) / S; equality is obtained only when the triangle is equilateral (see Mitrinovic reference). - Bernard Schott, Sep 27 2022
Surface area of a gyroelongated square bipyramid (Johnson solid J_17) with unit edges. - Paolo Xausa, Aug 02 2025

Examples

			6.928203230275509174109785366023489467771221015241522512223227917807732...
		

References

  • J. N. Kapur, Mathematics Enjoyment For The Millions, Problem 47 pp. 64-67, Arya Book Depot, New Delhi 2000.
  • D. S. Mitrinovic, E. S. Barnes, D. C. B. Marsh, J. R. M. Radok, Elementary Inequalities, Tutorial Text 1 (1964), P. Noordhoff LTD, Groningen, problem 6.3, page 112.

Crossrefs

Cf. A040041 (continued fraction).
Cf. A002194, A104956, A010527, A152623 (other geometric inequalities).

Programs

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

Formula

Equals 4*A002194. - R. J. Mathar, Jul 31 2010
Equals A176053/A246724 - 7 (2nd comment and Soddy link). - Bernard Schott, Mar 17 2022
Equals 1/A020805. - Bernard Schott, Sep 28 2022

A067280 Number of terms in continued fraction for sqrt(n), excl. 2nd and higher periods.

Original entry on oeis.org

1, 2, 3, 1, 2, 3, 5, 3, 1, 2, 3, 3, 6, 5, 3, 1, 2, 3, 7, 3, 7, 7, 5, 3, 1, 2, 3, 5, 6, 3, 9, 5, 5, 5, 3, 1, 2, 3, 3, 3, 4, 3, 11, 9, 7, 13, 5, 3, 1, 2, 3, 7, 6, 7, 5, 3, 7, 8, 7, 5, 12, 5, 3, 1, 2, 3, 11, 3, 9, 7, 9, 3, 8, 6, 5, 13, 7, 5, 5, 3, 1, 2, 3, 3, 6, 11, 3, 7, 6, 3, 9, 9, 11, 17, 5, 5, 12, 5
Offset: 1

Views

Author

Frank Ellermann, Feb 23 2002

Keywords

Examples

			a(2)=2: [1,(2)+ ]; a(3)=3: [1,(1,2)+ ]; a(4)=1: [2]; a(5)=2: [2,(4)+ ].
		

References

  • H. Davenport, The Higher Arithmetic. Cambridge Univ. Press, 7th edition, 1999, table 1.

Crossrefs

Related sequences: 2 : A040000, ..., 44: A040037, 48: A040041, ..., 51: A040043, 56: A040048, 60: A040052, 63: A040055, ..., 66: A040057. 68: A040059, 72: A040063, 80: A040071.
Related sequences: 45: A010135, ..., 47: A010137, 52: A010138, ..., 55: A010141, 57: A010142, ..., 59: A010144. 61: A010145, 62: A010146. 67: A010147, 69: A010148, ..., 71: A010150.
Cf. A003285.

Programs

  • Python
    from sympy import continued_fraction_periodic
    def A067280(n): return len((a := continued_fraction_periodic(0,1,n))[:1]+(a[1] if a[1:] else [])) # Chai Wah Wu, Jun 14 2022

Formula

a(n) = A003285(n) + 1. - Andrey Zabolotskiy, Jun 23 2020

Extensions

Name clarified by Michel Marcus, Jun 22 2020
Showing 1-3 of 3 results.