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

A146325 Period 3: repeat [1, 4, 1].

Original entry on oeis.org

1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

Continued fraction of (1 + sqrt(26))/5 = A188659.
Digital roots of the centered triangular numbers A005448. - Ant King, May 08 2012
Also the digital roots of centered 12-gonal numbers A003154. - Peter M. Chema, Dec 20 2023

Crossrefs

Cf. A003154, A005448, A021337, A131534 (square roots), A188659.

Programs

  • Magma
    &cat [[1,4,1]^^40]; // Bruno Berselli, Jun 27 2016
  • Maple
    seq(op([1, 4, 1]), n=1..50); # Wesley Ivan Hurt, Jul 01 2016
  • Mathematica
    Table[Round[N[4 (Cos[(2 n - 1) ArcTan[Sqrt[3]]])^2, 100]], {n, 1, 100}]
    PadLeft[{},111,{1,4,1}] (* Harvey P. Dale, Sep 18 2011 *)
  • PARI
    a(n)=1+3*(n%3==2) \\ Jaume Oliver Lafont, Mar 24 2009
    

Formula

a(n) = 4*(cos((2*n - 1)*Pi/3))^2 = 4 - 4*(sin((2*n - 1)*Pi/3))^2.
a(n+3) = a(n).
a(n) = 2 - cos(2*Pi*n/3) + sqrt(3)*sin(2*Pi*n/3).
O.g.f.: x*(1+4*x+x^2)/(1-x^3). [Richard Choulet, Nov 03 2008]
a(n) = 6 - a(n-1) - a(n-2) for n>2. - Ant King, Jun 12 2012
a(n) = (n mod 3)^(n mod 3). - Bruno Berselli, Jun 27 2016
a(n) = 1 + A021337(n) for n>0. - Wesley Ivan Hurt, Jul 01 2016

A177702 Period 3: repeat [1, 1, 2].

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, May 11 2010

Keywords

Comments

Continued fraction expansion of (2+sqrt(10))/3.
Decimal expansion of 112/999.
a(n) = A131534(n+2) = |A132419(n)| = |A132367(n)| = |A131556(n+2)|= |A122876(n)|.

Crossrefs

Programs

  • Magma
    &cat[ [1, 1, 2]: k in [1..35] ];
    
  • Maple
    seq(op([1, 1, 2]), n=1..50); # Wesley Ivan Hurt, Jul 01 2016
  • Mathematica
    PadRight[{},120,{1,1,2}] (* or *) LinearRecurrence[{0,0,1},{1,1,2},120] (* Harvey P. Dale, Dec 19 2014 *)
  • PARI
    a(n)=max(n%3,1) \\ Charles R Greathouse IV, Jul 17 2016

Formula

a(n) = a(n-3) for n > 2, with a(0) = 1, a(1) = 1, a(2) = 2.
G.f.: (1+x+2*x^2)/(1-x^3).
a(n) = 4/3 - cos(2*Pi*n/3)/3 - sin(2*Pi*n/3)/sqrt(3). - R. J. Mathar, Oct 08 2011
a(n) = 1 + A022003(n). - Wesley Ivan Hurt, Jul 01 2016

A195547 Denominators a(n) of Pythagorean approximations b(n)/a(n) to 1/2.

Original entry on oeis.org

1, 4, 12, 15, 80, 208, 273, 1428, 3740, 4895, 25632, 67104, 87841, 459940, 1204140, 1576239, 8253296, 21607408, 28284465, 148099380, 387729212, 507544127, 2657535552, 6957518400, 9107509825, 47687540548, 124847601996, 163427632719, 855718194320, 2240299317520
Offset: 1

Views

Author

Clark Kimberling, Sep 20 2011

Keywords

Comments

See A195500 for a discussion and references.
a(n) is the numerator of the harmonic mean of F(n) and F(n+1), where F = A000045 (Fibonacci numbers). Example: 2*F(9)*F(10)/(F(9)+F(10)) = 2*34*55/(34+55) = 3740/89, therefore a(9) = 3740. - Francesco Daddi, Jul 04 2018

Crossrefs

Programs

  • Mathematica
    r = 1/2; z = 30;
    p[{f_, n_}] := (#1[[2]]/#1[[
          1]] &)[({2 #1[[1]] #1[[2]], #1[[1]]^2 - #1[[
             2]]^2} &)[({Numerator[#1], Denominator[#1]} &)[
         Array[FromContinuedFraction[
            ContinuedFraction[(#1 + Sqrt[1 + #1^2] &)[f], #1]] &, {n}]]]];
    {a, b} = ({Denominator[#1], Numerator[#1]} &)[
      p[{r, z}]]  (* A195547, A195548 *)
    Sqrt[a^2 + b^2] (* A195549 *)
    (* Peter J. C. Moses, Sep 02 2011 *)
    Table[Numerator[2 Fibonacci[n] Fibonacci[n+1] / ( Fibonacci[n] + Fibonacci[n+1])], {n, 1, 40}] (* Vincenzo Librandi, Jul 21 2018 *)

Formula

a(n) = 2*F(n)*F(n+1)/(2-((n+2)^2 mod 3)), where F(n)=Fibonacci(n). - Gary Detlefs, Oct 15 2011
Empirical G.f.: x*(1+4*x+12*x^2-2*x^3+12*x^4+4*x^5+x^6)/(1-17*x^3-17*x^6+x^9). - Colin Barker, Apr 15 2012

A195549 Hypotenuses of primitive Pythagorean triples in A195547 and A195548.

Original entry on oeis.org

1, 5, 13, 17, 89, 233, 305, 1597, 4181, 5473, 28657, 75025, 98209, 514229, 1346269, 1762289, 9227465, 24157817, 31622993, 165580141, 433494437, 567451585, 2971215073, 7778742049, 10182505537, 53316291173, 139583862445, 182717648081
Offset: 1

Views

Author

Clark Kimberling, Sep 20 2011

Keywords

Comments

See A195500 for discussion and list of related sequences; see A195547 for Mathematica program.

Crossrefs

Programs

  • Maple
    with(combinat):f:= n-> fibonacci(n):seq((f(n)^2+f(n+1)^2)/(2-((n+2)^2 mod 3)), n=1..25);

Formula

a(n) = (F(n)^2 + F(n+1)^2)/(2 - ((n+2)^2 mod 3)), F(n) = Fibonacci(n). - Gary Detlefs, Oct 14 2011
Conjectures from Colin Barker, Apr 08 2012: (Start)
a(n) = 18*a(n-3) - a(n-6).
G.f.: x*(1+5*x+13*x^2-x^3-x^4-x^5)/((1-3*x+x^2)*(1+3*x+8*x^2+3*x^3+x^4)). (End)
Conjecture: a(n) is the denominator of the reduced fraction (F(2*n+1)-2)/F(2*n+1), F(n) = Fibonacci(n). - Sébastien Labbé, May 06 2022

A157334 First differences of A156799.

Original entry on oeis.org

1, 2, 1, 5, 1, 2, 1, 6, 1, 2, 1, 5, 1, 2, 1, 15, 1, 2, 1, 5, 1, 2, 1, 6, 1, 2, 1, 5, 1, 2, 1, 19, 1, 2, 1, 5, 1, 2, 1, 6, 1, 2, 1, 5, 1, 2, 1, 15, 1, 2, 1, 5, 1, 2, 1, 6, 1, 2, 1, 5, 1, 2, 1, 43, 1, 2, 1, 5, 1, 2, 1, 6, 1, 2, 1, 5, 1, 2, 1, 15, 1, 2, 1, 5, 1, 2, 1, 6, 1, 2, 1, 5, 1, 2, 1, 19
Offset: 0

Views

Author

Paul Curtz, Feb 27 2009

Keywords

Comments

For 1,2,1 see A131534. First of a family of four: second is 3,1,1,4,3,1,1,2,3=A157076, third is 9,10,9,14,4,1,10 (from 3's in A090822), fourth is 220,221,220,224, (from A157107). Many consequences.

A195548 Numerators b(n) of Pythagorean approximations b(n)/a(n) to 1/2.

Original entry on oeis.org

0, 3, 5, 8, 39, 105, 136, 715, 1869, 2448, 12815, 33553, 43920, 229971, 602069, 788120, 4126647, 10803705, 14142232, 74049691, 193864605, 253772064, 1328767775, 3478759201, 4553754912, 23843770275, 62423800997, 81713816360, 427859097159, 1120149658761
Offset: 1

Views

Author

Clark Kimberling, Sep 20 2011

Keywords

Comments

See A195500 for discussion and list of related sequences; see A195547 for Mathematica program.

Crossrefs

Formula

a(n) = (F(n+1)^2-F(n)^2)/(2-((n+2)^2 mod 3)), where F(n)=Fibonacci(n). [Gary Detlefs, Oct 15 2011]
Empirical G.f.: x*(3+5*x+8*x^2-12*x^3+20*x^4+x^6-x^7)/(1-17*x^3-17*x^6+x^9). [Colin Barker, Apr 15 2012]

A210209 GCD of all sums of n consecutive Fibonacci numbers.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 4, 1, 3, 2, 11, 1, 8, 1, 29, 2, 21, 1, 76, 1, 55, 2, 199, 1, 144, 1, 521, 2, 377, 1, 1364, 1, 987, 2, 3571, 1, 2584, 1, 9349, 2, 6765, 1, 24476, 1, 17711, 2, 64079, 1, 46368, 1, 167761, 2, 121393, 1, 439204, 1, 317811, 2, 1149851, 1, 832040
Offset: 0

Views

Author

Alonso del Arte, Mar 18 2012

Keywords

Comments

Early on in the Posamentier & Lehmann (2007) book, the fact that the sum of any ten consecutive Fibonacci numbers is a multiple of 11 is presented as an interesting property of the Fibonacci numbers. Much later in the book a proof of this fact is given, using arithmetic modulo 11. An alternative proof could demonstrate that 11*F(n + 6) = Sum_{i=n..n+9} F(i).

Examples

			a(3) = 2 because all sums of three consecutive Fibonacci numbers are divisible by 2 (F(n) + F(n-1) + F(n-2) = 2F(n)), but since the GCD of 3 + 5 + 8 = 16 and 5 + 8 + 13 = 26 is 2, no number larger than 2 divides all sums of three consecutive Fibonacci numbers.
a(4) = 1 because the GCD of 1 + 1 + 2 + 3 = 7 and 1 + 2 + 3 + 5 = 11 is 1, so the sums of four consecutive Fibonacci numbers have no factors in common.
		

References

  • Alfred S. Posamentier & Ingmar Lehmann, The (Fabulous) Fibonacci Numbers, Prometheus Books, New York (2007) p. 33.

Crossrefs

Cf. A000045, A000071, sum of the first n Fibonacci numbers, A001175 (Pisano periods). Cf. also A229339.
Bisections give: A005013 (even part), A131534 (odd part).
Sums of m consecutive Fibonacci numbers: A055389 (m = 3, ignoring the initial 1); A000032 (m = 4, these are the Lucas numbers); A013655 (m = 5); A022087 (m = 6); A022096 (m = 7); A022379 (m = 8).

Programs

  • Maple
    a:= n-> (Matrix(7, (i, j)-> `if`(i=j-1, 1, `if`(i=7, [1, 0, -3, -1, 1, 3, 0][j], 0)))^iquo(n, 2, 'r'). `if`(r=0, <<0, 1, 1, 4, 3, 11, 8>>, <<1, 2, 1, 1, 2, 1, 1>>))[1, 1]: seq(a(n), n=0..80);  # Alois P. Heinz, Mar 18 2012
  • Mathematica
    Table[GCD[Fibonacci[n + 1] - 1, Fibonacci[n]], {n, 1, 50}] (* Horst H. Manninger, Dec 19 2021 *)
  • PARI
    a(n)=([0,1,0,0,0,0,0,0,0,0,0,0,0,0; 0,0,1,0,0,0,0,0,0,0,0,0,0,0; 0,0,0,1,0,0,0,0,0,0,0,0,0,0; 0,0,0,0,1,0,0,0,0,0,0,0,0,0; 0,0,0,0,0,1,0,0,0,0,0,0,0,0; 0,0,0,0,0,0,1,0,0,0,0,0,0,0; 0,0,0,0,0,0,0,1,0,0,0,0,0,0; 0,0,0,0,0,0,0,0,1,0,0,0,0,0; 0,0,0,0,0,0,0,0,0,1,0,0,0,0; 0,0,0,0,0,0,0,0,0,0,1,0,0,0; 0,0,0,0,0,0,0,0,0,0,0,1,0,0; 0,0,0,0,0,0,0,0,0,0,0,0,1,0; 0,0,0,0,0,0,0,0,0,0,0,0,0,1; 1,0,0,0,-3,0,-1,0,1,0,3,0,0,0]^n*[0;1;1;2;1;1;4;1;3;2;11;1;8;1])[1,1] \\ Charles R Greathouse IV, Jun 20 2017

Formula

G.f.: -x*(x^12-x^11+2*x^10-x^9-2*x^8-x^7-6*x^6+x^5-2*x^4+x^3+2*x^2+x+1) / (x^14-3*x^10-x^8+x^6+3*x^4-1) = -1/(x^4+x^2-1) + (x^2+1)/(x^4-x^2-1) + (x+2)/(6*(x^2+x+1)) + (x-2)/(6*(x^2-x+1)) - 2/(3*(x+1)) - 2/(3*(x-1)). - Alois P. Heinz, Mar 18 2012
a(n) = gcd(Fibonacci(n+1)-1, Fibonacci(n)). - Horst H. Manninger, Dec 19 2021
From Aba Mbirika, Jan 21 2022: (Start)
a(n) = gcd(F(n+1)-1, F(n+2)-1).
a(n) = Lcm_{A001175(m) divides n} m.
Proofs of these formulas are given in Theorems 15 and 25 of the Guyer-Mbirika paper. (End)

Extensions

More terms from Alois P. Heinz, Mar 18 2012

A364447 Repeat [1,2,1,3].

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1
Offset: 1

Views

Author

Rok Cestnik, Jul 25 2023

Keywords

Comments

Continued fraction of sqrt(5) - 3/2 = 0.7360679... (without integer part); and (4*sqrt(5) + 6)/11 = 1.3585701... (with integer part).
Lexicographically earliest sequence in which n is banned for n terms after each appearance (see A364448 for n^2 and A364449 for n^3).

Crossrefs

Cf. A131743 (repeat [0,1,0,2]).

Programs

  • Mathematica
    PadRight[{}, 100, {1, 2, 1, 3}] (* Paolo Xausa, Jan 23 2025 *)
  • Python
    def A364447(n): return (3,1,2,1)[n&3] # Chai Wah Wu, Jul 29 2023

Formula

a(n) = A131743(n-1) + 1.

A245477 Period 6: repeat [1, 1, 1, 1, 1, 2].

Original entry on oeis.org

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

Views

Author

Hailey R. Olafson, Jul 23 2014

Keywords

Comments

First differences of A047368. The first differences of this sequence are in A131533. - Wesley Ivan Hurt, Jul 24 2014
Binomial Transform of a(n) gives: 1, 2, 4, 8, 16, 33, 70, 149, 312, 638, 1276, 2511, ... - Wesley Ivan Hurt, Aug 13 2014

Crossrefs

Programs

  • Magma
    [Floor((n+1)*7/6) - Floor((n)*7/6) : n in [0..100]]; // Wesley Ivan Hurt, Aug 06 2014
  • Maple
    A:= n -> piecewise(n mod 6 = 5, 2, 1);
    seq(A(n), n=0..100); # Robert Israel, Jul 23 2014
  • Mathematica
    Table[2 - Sign[Mod[n + 1, 6]], {n, 0, 100}] (* Wesley Ivan Hurt, Jul 24 2014 *)
    PadRight[{},120,{1,1,1,1,1,2}] (* Harvey P. Dale, Jun 02 2016 *)
  • PARI
    a(n) = 7*(n+1)\6 - 7*n\6; \\ Michel Marcus, Jul 23 2014
    
  • Sage
    [floor((n+1)*7/6) - floor((n)*7/6) for n in [0..200]]
    

Formula

a(n) = floor((n+1)*7/6) - floor((n)*7/6).
G.f.: 1/(1-x) + x^5/(1-x^6). - Robert Israel, Jul 23 2014
From Wesley Ivan Hurt, Jul 24 2014, Aug 06-29 2014: (Start)
a(n) = 2 - sign((n+1) mod 6).
a(n) = 3 - 2^sign((n+1) mod 6).
a(n) = A172051(n) + 1.
a(2n) = 1, a(2n+1) = A177702(n).
Sum_{i=0..n-2} a(i) = A047368(n), n>0.
a(n) = 1 + mod(n, 1 + mod(n-1, 3)).
a(n) = 1 + binomial(mod(5n + 10, 6), 5). (End)
From Wesley Ivan Hurt, Jun 23 2016: (Start)
a(n) = a(n-6) for n>5.
a(n) = (7 - cos(n*Pi) + cos(n*Pi/3) - cos(2*n*Pi/3) - sqrt(3)*sin(n*Pi/3) - sqrt(3)*sin(2*n*Pi/3))/6. (End)

A106740 Triangle read by rows: greatest common divisors of pairs of Fibonacci numbers greater than 1: T(n, k) = gcd(Fibonacci(n), Fibonacci(k)).

Original entry on oeis.org

2, 1, 3, 1, 1, 5, 2, 1, 1, 8, 1, 1, 1, 1, 13, 1, 3, 1, 1, 1, 21, 2, 1, 1, 2, 1, 1, 34, 1, 1, 5, 1, 1, 1, 1, 55, 1, 1, 1, 1, 1, 1, 1, 1, 89, 2, 3, 1, 8, 1, 3, 2, 1, 1, 144, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 233, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 377, 2, 1, 5, 2, 1, 1, 2, 5, 1, 2, 1, 1, 610
Offset: 3

Views

Author

Reinhard Zumkeller, May 15 2005

Keywords

Examples

			Triangle begins as:
  2;
  1, 3;
  1, 1, 5;
  2, 1, 1, 8;
  1, 1, 1, 1, 13;
  1, 3, 1, 1,  1, 21;
  2, 1, 1, 2,  1,  1, 34;
  1, 1, 5, 1,  1,  1,  1, 55;
  1, 1, 1, 1,  1,  1,  1,  1, 89;
  2, 3, 1, 8,  1,  3,  2,  1,  1, 144;
  1, 1, 1, 1,  1,  1,  1,  1,  1,   1, 233;
  1, 1, 1, 1, 13,  1,  1,  1,  1,   1,   1, 377;
  2, 1, 5, 2,  1,  1,  2,  5,  1,   2,   1,   1, 610;
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= GCD[Fibonacci[n], Fibonacci[k]];
    Table[T[n, k], {n,3,18}, {k,3,n}]//Flatten (* G. C. Greubel, Sep 11 2021 *)
  • Sage
    def T(n,k): return gcd(fibonacci(n), fibonacci(k))
    flatten([[T(n,k) for k in (3..n)] for n in (3..18)]) # G. C. Greubel, Sep 11 2021

Formula

T(n, k) = gcd(A000045(n), A000045(k)) for n >= 3 and 3 <= k <= n.
T(n, 3) = abs(A061347(n)).
T(n, 4) = A093148(n-1).
T(n, n) = A000045(n).
From G. C. Greubel, Sep 11 2021: (Start)
T(n, 3) = A131534(n-2).
T(n, 5) = A060904(n).
T(n, 6) = A010125(n).
T(n, n-1) = T(n, n-2) = A000012(n).
T(n, n-3) = A093148(n-5).
T(n, n-4) = A093148(n-5).
T(n, n-5) = A060904(n-5).
T(n, n-6) = A010125(n-6). (End)
Previous Showing 11-20 of 24 results. Next