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

A134451 Ternary digital root of n.

Original entry on oeis.org

0, 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, 1, 2
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 27 2007

Keywords

Comments

Continued fraction expansion of sqrt(3) - 1. - N. J. A. Sloane, Dec 17 2007. Cf. A040001, A048878/A002530.
Minimum number of terms required to express n as a sum of odd numbers.
Shadow transform of even numbers A005843. - Michel Marcus, Jun 06 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

			n=42: A007089(42) = '1120', A053735(42) = 1+1+2+0 = 4,
A007089(4)='11', A053735(4)=1+1=2: therefore a(42) = 2.
0.732050807568877293527446341... = 0 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...)))). - _Harry J. Smith_, May 31 2009
		

Crossrefs

Cf. A000010, A055034, A134452, A160390 (decimal expansion).
Apart from a(0) the same as A040001.
Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1).

Programs

Formula

a(n) = n if n <= 2, otherwise a(A053735(n)).
a(A005408(n)) = 1; a(A005843(n)) = 2 for n>0;
a(n) = 0 if n=0, otherwise A000034(n-1).
a(n) = ((n+1) mod 2) + 2*sign(n) - 1. - Wesley Ivan Hurt, Dec 06 2013
Multiplicative with a(2^e) = 2, a(p^e) = 1 for odd prime p. - Andrew Howroyd, Aug 06 2018
a(0) = A055034(1) / A000010(1), a(n) = A000010(n+1) / A055034(n+1), n>1. - Torlach Rush, Oct 29 2019
Dirichlet g.f.: zeta(s)*(1+1/2^s). - Amiram Eldar, Jan 01 2023

A048788 a(2n+1) = a(2n) + a(2n-1), a(2n) = 2*a(2n-1) + a(2n-2); a(n) = n for n = 0, 1.

Original entry on oeis.org

0, 1, 2, 3, 8, 11, 30, 41, 112, 153, 418, 571, 1560, 2131, 5822, 7953, 21728, 29681, 81090, 110771, 302632, 413403, 1129438, 1542841, 4215120, 5757961, 15731042, 21489003, 58709048, 80198051, 219105150, 299303201, 817711552, 1117014753
Offset: 0

Views

Author

Robin Trew (trew(AT)hcs.harvard.edu), Dec 11 1999

Keywords

Comments

Numerators of continued fraction convergents to sqrt(3) - 1 (A160390). See A002530 for denominators. - N. J. A. Sloane, Dec 17 2007
Convergents are 1, 2/3, 3/4, 8/11, 11/15, 30/41, 41/56, 112/153, ... - Clark Kimberling, Sep 21 2013
A strong divisibility sequence, that is gcd(a(n),a(m)) = a(gcd(n,m)) for all positive integers n and m. - Peter Bala, Jun 06 2014
From Sarah-Marie Belcastro, Feb 15 2022: (Start)
a(n) is also the number of perfect matchings of an edge-labeled 2 X (n-1) Mobius band grid graph, or equivalently the number of domino tilings of a 2 X (n-1) Mobius band grid. (The twist is on the length-n side.)
a(n) is also the output of Lu and Wu's formula for the number of perfect matchings of an m X n Mobius band grid, specialized to m = 2 with the twist on the length-n side.
2*a(n) is the number of perfect matchings of an edge-labeled 2 X (n-1) projective planar grid graph, or equivalently the number of domino tilings of a 2 X (n-1) projective planar grid. (End)

References

  • Russell Lyons, A bird's-eye view of uniform spanning trees and forests, in Microsurveys in Discrete Probability, AMS, 1998.

Crossrefs

Bisections are A001835 and A052530.

Programs

  • GAP
    a:=[0,1,2,3];; for n in [5..40] do a[n]:=4a[n-1]-a[n-2]; od; a; # G. C. Greubel, Dec 23 2019
  • Magma
    I:=[0,1,2,3]; [n le 4 select I[n] else 4*Self(n-2)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Dec 10 2013
    
  • Maple
    seq( simplify( `if`(`mod`(n,2)=0, 2*ChebyshevU((n-2)/2, 2), ChebyshevU((n-1)/2, 2) - ChebyshevU((n-3)/2, 2)) ), n=0..40); # G. C. Greubel, Dec 23 2019
  • Mathematica
    Numerator[NestList[(2/(2 + #))&, 0, 40]] (* Vladimir Joseph Stephan Orlovsky, Apr 13 2010 *)
    CoefficientList[Series[x(1+2x-x^2)/(1-4x^2+x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 10 2013 *)
    a0[n_]:= ((3+Sqrt[3])*(2-Sqrt[3])^n-((-3+Sqrt[3])*(2+Sqrt[3])^n))/6 // Simplify
    a1[n_]:= 2*Sum[a0[i], {i, 1, n}]
    Flatten[MapIndexed[{a1[#-1],a0[#]}&,Range[20]]] (* Gerry Martens, Jul 10 2015 *)
    Round@Table[With[{r=1+Sqrt[2], s=1+Sqrt[3]}, ((r + (-1)^n/r) s^n/2^(n/2) - (1/r + (-1)^n r) 2^(n/2)/s^n) Sqrt[6]/12], {n, 0, 20}] (* or *) LinearRecurrence[ {0,4,0,-1}, {0,1,2,3}, 40] (* Vladimir Reshetnikov, May 11 2016 *)
    Table[If[EvenQ[n], 2*ChebyshevU[(n-2)/2, 2], ChebyshevU[(n-1)/2, 2] - ChebyshevU[(n-3)/2, 2]], {n, 0, 40}] (* G. C. Greubel, Dec 23 2019 *)
  • PARI
    main(size)=v=vector(size); v[1]=0;v[2]=1;v[3]=2;v[4]=3;for(i=5, size, v[i]=4*v[i-2] - v[i-4]); v; \\ Anders Hellström, Jul 11 2015
    
  • PARI
    a=vector(50); a[1]=1; a[2]=2; for(n=3, #a, if(n%2==1, a[n]=a[n-1]+a[n-2], a[n]=2*a[n-1]+a[n-2])); concat(0, a) \\ Colin Barker, Jan 30 2016
    
  • PARI
    a(n)=([0,1,0,0;0,0,1,0;0,0,0,1;-1,0,4,0]^n*[0;1;2;3])[1,1] \\ Charles R Greathouse IV, Mar 16 2017
    
  • PARI
    apply( {A048788(n)=imag((2+quadgen(12))^(n\/2)*if(bittest(n, 0), quadgen(12)-1, 2))}, [0..30]) \\ M. F. Hasler, Nov 04 2019
    
  • PARI
    {a(n) = my(s=1,m=n); if(n<0,s=-(-1)^n; m=-n); polcoeff(x*(1+2*x-x^2)/(1-4*x^2+x^4) + x*O(x^m), m)*s}; /* Michael Somos, Sep 17 2020 */
    
  • Sage
    @CachedFunction
    def a(n):
        if (mod(n,2)==0): return 2*chebyshev_U((n-2)/2, 2)
        else: return chebyshev_U((n-1)/2, 2) - chebyshev_U((n-3)/2, 2)
    [a(n) for n in (0..40)] # G. C. Greubel, Dec 23 2019
    

Formula

G.f.: x*(1+2*x-x^2)/(1-4*x^2+x^4). - Paul Barry, Sep 18 2009
a(n) = 4*a(n-2) - a(n-4). - Vincenzo Librandi, Dec 10 2013
a(2*n-1) = A001835(n); a(2*n) = 2*A001353(n). - Peter Bala, Jun 06 2014
From Gerry Martens, Jul 11 2015: (Start)
Interspersion of 2 sequences [a1(n-1),a0(n)] for n>0:
a0(n) = ((3+sqrt(3))*(2-sqrt(3))^n-((-3+sqrt(3))*(2+sqrt(3))^n))/6.
a1(n) = 2*Sum_{i=1..n} a0(i). (End)
a(n) = ((r + (-1)^n/r)*s^n/2^(n/2) - (1/r + (-1)^n*r)*2^(n/2)/s^n)*sqrt(6)/12, where r = 1 + sqrt(2), s = 1 + sqrt(3). - Vladimir Reshetnikov, May 11 2016
a(n) = 2*ChebyshevU(n-1, 2) if n is even and ChebyshevU(n, 2) - ChebyshevU(n-1, 2) if n in odd. - G. C. Greubel, Dec 23 2019
a(n) = -(-1)^n*a(-n) for all n in Z. - Michael Somos, Sep 17 2020

Extensions

Denominator of g.f. corrected by Paul Barry, Sep 18 2009
Incorrect g.f. deleted by Colin Barker, Aug 10 2012

A165663 Decimal expansion of 3 + sqrt(3).

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Sep 24 2009

Keywords

Comments

Arises as an upper limit of indices of subfactors in the extended Haagerup planar algebra (see Bigelow et al.)
Perimeter of a 30-60-90 triangle with shortest side equal to 1. - Wesley Ivan Hurt, Apr 09 2016
Surface area of an elongated triangular pyramid (Johnson solid J_7) with unit edges. - Paolo Xausa, Aug 02 2025

Examples

			4.732050807568877293527446341505872366942805253810380628...
		

Crossrefs

Programs

  • Magma
    SetDefaultRealField(RealField(100)); 3 + Sqrt(3); // G. C. Greubel, Nov 20 2018
    
  • Maple
    Digits:=100: evalf(3+sqrt(3)); # Wesley Ivan Hurt, Apr 09 2016
  • Mathematica
    RealDigits[3 + Sqrt[3], 10, 100][[1]] (* Wesley Ivan Hurt, Apr 09 2016 *)
  • PARI
    default(realprecision, 100); 3 + sqrt(3) \\ G. C. Greubel, Nov 20 2018
    
  • Sage
    numerical_approx(3+sqrt(3), digits=100) # G. C. Greubel, Nov 20 2018

Formula

Equals 4 + A160390 = 1 + A019973 = 2 + A090388 = 3 + A002194. - R. J. Mathar, Sep 27 2009

A286389 a(0) = 0; a(n) = n - a(floor(a(n-1)/2)).

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 4, 5, 6, 7, 8, 8, 9, 10, 10, 11, 12, 13, 14, 14, 15, 16, 16, 17, 18, 18, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 29, 30, 30, 31, 32, 32, 33, 34, 34, 35, 36, 36, 37, 38, 39, 40, 40, 41, 42, 42, 43, 44, 45, 46, 46, 47, 48, 48, 49, 50, 51, 52, 52, 53, 54, 54, 55, 56, 57, 58, 58
Offset: 0

Views

Author

Ilya Gutkovskiy, May 24 2017

Keywords

Comments

A variation on Hofstadter's G-sequence.
Conjecture: partial sums of A285431 (verified for n <= 400). - Sean A. Irvine, Jul 20 2022
The conjecture has been verified for n <= 50000. - Michel Dekking, Jul 06 2023
Irvine's conjecture is now proven using the Walnut theorem prover. - Jeffrey Shallit, Oct 21 2023

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = n - a[Floor[a[n - 1]/2]]; Array[a, 80, 0]
  • PARI
    a(n)=if(n>0,return(n-a(floor(a(n-1)/2))));return(0); \\ Anton Mosunov, May 26 2017

Formula

Conjecture: a(n) ~ c*n, where c = sqrt(3) - 1 = 0.732050807...
From Michel Dekking, Jul 06 2023: (Start)
This conjecture is implied by the conjecture in the COMMENTS, by a simple application of the Perron-Frobenius Theorem.
The vector (1, 1 + sqrt(3)) is a right eigenvector of the incidence matrix of the morphism 0->11, 1->110. Therefore the frequency of 1 in A285431 is equal to sqrt(3) - 1. So if the conjecture in the COMMENTS is true, then this implies that a(n)/n converges to sqrt(3) - 1. (End)

A138466 a(1)=1; for n >= 2, a(n) = n - floor((1/2)*a(a(n-1))).

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 16, 16, 17, 18, 19, 19, 20, 21, 21, 22, 23, 24, 24, 25, 26, 27, 27, 28, 29, 30, 30, 31, 32, 32, 33, 34, 35, 35, 36, 37, 38, 38, 39, 40, 40, 41, 42, 43, 43, 44, 45, 46, 46, 47, 48, 49, 49, 50, 51, 51, 52, 53, 54
Offset: 1

Views

Author

Benoit Cloitre, May 09 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Floor[(Sqrt[3] - 1)*(Range[100] + 1)] (* Wesley Ivan Hurt, Jan 20 2024 *)
  • PARI
    a(n)=floor((sqrt(3)-1)*(n+1))

Formula

For n >= 1, a(n) = floor((sqrt(3)-1)*(n+1)).

A270397 Denominators of r-Egyptian fraction expansion for sqrt(3) - 1, where r(k) = 1/Fibonacci(k+1).

Original entry on oeis.org

2, 3, 6, 21, 411, 120274, 10572781147, 74407087111123560666, 5372512080606517833291366730287672914459, 41169436260792910821230360026041473906108740980452651576082359437785122898819171
Offset: 1

Views

Author

Clark Kimberling, Mar 22 2016

Keywords

Comments

Suppose that r is a sequence of rational numbers r(k) <= 1 for k >= 1, and that x is an irrational number in (0,1). Let f(0) = x, n(k) = floor(r(k)/f(k-1)), and f(k) = f(k-1) - r(k)/n(k). Then x = r(1)/n(1) + r(2)/n(2) + r(3)/n(3) + ..., the r-Egyptian fraction for x.
See A269993 for a guide to related sequences.

Examples

			sqrt(3) - 1 = 1/2 + 1/(2*3) + 1/(3*6) + 1/(5*21) + ...
		

Crossrefs

Programs

  • Mathematica
    r[k_] := 1/Fibonacci[k+1]; f[x_, 0] = x; z = 10;
    n[x_, k_] := n[x, k] = Ceiling[r[k]/f[x, k - 1]]
    f[x_, k_] := f[x, k] = f[x, k - 1] - r[k]/n[x, k]
    x = Sqrt[3] - 1; Table[n[x, k], {k, 1, z}]
  • PARI
    r(k) = 1/fibonacci(k+1);
    f(k,x) = if (k==0, x, f(k-1, x) - r(k)/a(k, x););
    a(k, x=sqrt(3)-1) = ceil(r(k)/f(k-1, x)); \\ Michel Marcus, Mar 22 2016

A270520 Denominators of r-Egyptian fraction expansion for sqrt(3) - 1, where r(k) = 1/k!.

Original entry on oeis.org

2, 3, 3, 5, 6, 14, 28, 352, 18574, 44518346, 400826881311158, 25342673472297507115832358714, 62130292590921086469117151395751018383242940308998211770
Offset: 1

Views

Author

Clark Kimberling, Mar 30 2016

Keywords

Comments

Suppose that r is a sequence of rational numbers r(k) <= 1 for k >= 1, and that x is an irrational number in (0,1). Let f(0) = x, n(k) = floor(r(k)/f(k-1)), and f(k) = f(k-1) - r(k)/n(k). Then x = r(1)/n(1) + r(2)/n(2) + r(3)/n(3) + ..., the r-Egyptian fraction for x.
See A269993 for a guide to related sequences.

Examples

			sqrt(3) - 1 = 1/(1*2) + 1/(2*3) + 1/(6*3) + 1/(24*5) + ...
		

Crossrefs

Programs

  • Mathematica
    r[k_] := 1/k!; f[x_, 0] = x; z = 10;
    n[x_, k_] := n[x, k] = Ceiling[r[k]/f[x, k - 1]]
    f[x_, k_] := f[x, k] = f[x, k - 1] - r[k]/n[x, k]
    x = Sqrt[3] - 1; Table[n[x, k], {k, 1, z}]
  • PARI
    r(k) = 1/k!;
    f(k,x) = if (k==0, x, f(k-1, x) - r(k)/a(k, x););
    a(k, x=sqrt(3)-1) = ceil(r(k)/f(k-1, x)); \\ Michel Marcus, Mar 31 2016

A270549 Denominators of r-Egyptian fraction expansion for sqrt(3) - 1, where r(k) = 1/(2k-1).

Original entry on oeis.org

2, 2, 4, 10, 102, 9988, 462079550, 1246459580018549814, 3451767175159069042246539740614797183, 16047263805335625632784779620610026996218698731392917143951229224582015756
Offset: 1

Views

Author

Clark Kimberling, Apr 02 2016

Keywords

Comments

Suppose that r is a sequence of rational numbers r(k) <= 1 for k >= 1, and that x is an irrational number in (0,1). Let f(0) = x, n(k) = floor(r(k)/f(k-1)), and f(k) = f(k-1) - r(k)/n(k). Then x = r(1)/n(1) + r(2)/n(2) + r(3)/n(3) + ..., the r-Egyptian fraction for x.
See A269993 for a guide to related sequences.

Examples

			sqrt(3) - 1 = 1/(1*2) + 1/(3*2) + 1/(5*4) + 1/(7*10) + ...
		

Crossrefs

Programs

  • Mathematica
    r[k_] := 1/(2k-1); f[x_, 0] = x; z = 10;
    n[x_, k_] := n[x, k] = Ceiling[r[k]/f[x, k - 1]]
    f[x_, k_] := f[x, k] = f[x, k - 1] - r[k]/n[x, k]
    x = Sqrt(3) - 1; Table[n[x, k], {k, 1, z}]
  • PARI
    r(k) = 1/(2*k-1);
    f(k,x) = if (k==0, x, f(k-1, x) - r(k)/a(k, x););
    a(k, x=sqrt(3)-1) = ceil(r(k)/f(k-1, x)); \\ Michel Marcus, Apr 03 2016

A302708 Constant of a logarithmic spiral interpolating the centers of regular hexagons: (-6/Pi)*log(-1 + sqrt(3)).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Apr 14 2018

Keywords

Comments

For the sequence of regular hexagons H_k with centers 0_k, for integers k, see the link. These centers form a discrete spiral which is interpolated by a logarithmic spiral r(phi) = exp(-kappa*phi) with origin S = (0, 1) if the hexagon H_0 has center 0_0 = (0, 0), inscribed in a circle of radius 1 length unit, and a vertex V_0(0) = (1, 0). In the link this coordinate system is called (x_0, y_0). The constant of the logarithmic spiral is kappa = (-6/Pi)*log(-1 + sqrt(3)). For -1 + sqrt(3) (the scaling factor for the hexagons called sigma in the linked paper) see A160390.
The constant angle between the radial direction of a spiral point and the tangent is given by arccot(kappa) approximately 1.033548019, corresponding to an angle of about 59.218 degrees (complementary to 120.782 degrees).

Examples

			0.59569535437899341987896613377536017371231315458288726686676607503292533487083...
		

Crossrefs

Cf. A160390.

Programs

  • Mathematica
    RealDigits[6*Log[Sqrt[3] - 1]/Pi, 10, 120][[1]] (* Amiram Eldar, Jun 12 2023 *)
  • PARI
    default(realprecision,120); -(6/Pi)*log(-1 + sqrt(3)) \\ Georg Fischer, Jul 18 2021

Formula

Equals -(6/Pi)*log(-1 + sqrt(3)) = -(6/Pi)*log(A160390).

Extensions

a(102) corrected by Georg Fischer, Jul 18 2021

A344111 Decimal expansion of 4 + sqrt(3).

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, May 10 2021

Keywords

Comments

Decimal expansion of the surface area of a gyrobifastigium with regular faces and unit edge length.
Essentially the same sequence of digits as A176102, A165663, A160390, A090388, A019973 and A002194. - R. J. Mathar, May 16 2021

Examples

			5.73205080756887729...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[4 + Sqrt[3], 10, 100] // Flatten
Showing 1-10 of 11 results. Next