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-5 of 5 results.

A177706 Period 5: repeat [1, 1, 1, 1, 2].

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, May 11 2010

Keywords

Comments

Continued fraction expansion of (5+sqrt(65))/8.
Decimal expansion of 3704/33333.

Crossrefs

Cf. A130782 (repeat 1, 1, 2, 1, 1), A177707 (decimal expansion of (5+sqrt(65))/8).

Programs

  • Magma
    &cat[ [1, 1, 1, 1, 2]: k in [1..21] ];
  • Maple
    A177706:=n->floor(6*(n+1)/5)-floor(6*n/5): seq(A177706(n), n=0..100); # Wesley Ivan Hurt, Jul 24 2014
  • Mathematica
    Table[Floor[6 (n + 1)/5] - Floor[6 n/5], {n, 0, 100}] (* Wesley Ivan Hurt, Jul 24 2014 *)

Formula

a(n) = a(n-5) for n > 4; a(0) = 1, a(1) = 1, a(2) = 1, a(3) = 1, a(4) = 2.
G.f.: (1+x+x^2+x^3+2*x^4)/(1-x^5).
a(n) = A130782(n+3).
a(n+4) = A198517(n+2) + A198517(n+1) + A198517(n). - Bruno Berselli, Nov 02 2011
a(n) = floor((n+1)*6/5) - floor((n)*6/5). - Hailey R. Olafson, Jul 23 2014
a(n) = (2/5)*(3 + cos(4*(n-4)*Pi/5) + cos(2*(n+1)*Pi/5)). - Wesley Ivan Hurt, Oct 05 2018
a(n) = 2 - ((n+1)^4 mod 5). - Aaron J Grech, Aug 30 2024

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)

A332410 a(n) = 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7) with a(0)=0, a(1)=1, a(2)=3, a(3)=6, a(4)=11, a(5)=17, a(6)=24.

Original entry on oeis.org

0, 1, 3, 6, 11, 17, 24, 32, 41, 52, 64, 77, 91, 106, 123, 141, 160, 180, 201, 224, 248, 273, 299, 326, 355, 385, 416, 448, 481, 516, 552, 589, 627, 666, 707, 749, 792, 836, 881, 928, 976, 1025, 1075, 1126, 1179
Offset: 0

Views

Author

Paul Curtz, Feb 11 2020

Keywords

Comments

This sequence occurs twice as a linear spoke in the hexagonal spiral constructed from A002266:
17 17 17 17 17 18 18
16 11 11 11 11 12 12 18
16 11 6 6 7 7 7 12 18
16 10 6 3 3 3 3 7 12 18
16 10 6 3 1 1 1 4 7 12 19
16 10 6 2 0 0 0 1 4 8 13 19
15 10 5 2 0 0 1 4 8 13 19
15 10 5 2 2 2 4 8 13 19
15 9 5 5 5 4 8 13 19
15 9 9 9 9 8 13 20
15 14 14 14 14 14 20
a(-1-n) = 0, 1, 4, 8, 13, 19, 26, 35, 45, ... also occurs twice in the same spiral.
Difference table:
0, 1, 3, 6, 11, 17, 24, 32, 41, 52, ... = a(n)
1, 2, 3, 5, 6, 7, 8, 9, 11, 12, ... = A047256(n+1)
1, 1, 2, 1, 1, 1, 1, 2, 1, 1, ... = A130782.
There is no linear spoke with three copies in this spiral. Compare with the spiral illustrated in sequence A330707 and constructed from A002265 where the same spokes occur three times: A006578, A001859 and A077043, essentially. Strictly, three times from 1, 1, 1 for A006578, from 2, 2, 2 for A001859 and from 7, 7, 7 for A077043.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, -1, 0, 0, 1, -2, 1}, {0, 1, 3, 6, 11, 17, 24}, 45] (* Amiram Eldar, Feb 12 2020 *)
  • PARI
    concat(0, Vec(x*(1 + x)*(1 + x^2 + x^3) / ((1 - x)^3*(1 + x + x^2 + x^3 + x^4)) + O(x^50))) \\ Colin Barker, Feb 11 2020, Apr 24 2020

Formula

a(8+n) - a(8-n) = 20*n.
G.f.: x*(1 + x)*(1 + x^2 + x^3) / ((1 - x)^3*(1 + x + x^2 + x^3 + x^4)). - Colin Barker, Feb 11 2020

A176976 Decimal expansion of (4+sqrt(65))/7.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Apr 30 2010

Keywords

Comments

Continued fraction expansion of (4+sqrt(65))/7 is A130782.

Examples

			(4+sqrt(65))/7 = 1.72317967832836423605...
		

Crossrefs

Cf. A010517 (decimal expansion of sqrt(65)), A130782 (repeat 1, 1, 2, 1, 1).

Programs

  • Mathematica
    RealDigits[(4 + Sqrt[65])/7, 10, 111][[1]] (* Robert G. Wilson v, Aug 19 2011 *)

A179850 Characteristic function of numbers that are congruent to {0, 1, 3, 4} mod 5.

Original entry on oeis.org

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

Views

Author

Michael Somos, Jan 10 2011

Keywords

Comments

a(n) is also the characteristic sequence for the mod m reduced odd numbers (i.e., gcd(2*n+1,m)=1, n>=0) for each modulus m from 5*A003592 = [5, 10, 20, 25, 40, 50, 80, 100, 125,...]. [Wolfdieter Lang, Feb 04 2012]

Examples

			G.f. = 1 + x + x^3 + x^4 + x^5 + x^6 + x^8 + x^9 + x^10 + x^11 + x^13 + ...
G.f. = q + q^3 + q^7 + q^9 + q^11 + q^13 + q^17 + q^19 + q^21 + q^23 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := Sign @ Mod[n - 2, 5]; (* Michael Somos, Jun 17 2015 *)
    a[ n_] := {1, 0, 1, 1, 1}[[Mod[n, 5, 1]]]; (* Michael Somos, Jun 17 2015 *)
  • PARI
    {a(n) = sign( (n - 2) % 5 )};
    
  • PARI
    {a(n) = [1, 1, 0, 1, 1][n%5 + 1]};

Formula

a(n) = b(2*n + 1) where b(n) is completely multiplicative with b(2) = b(5) = 0, otherwise b(p) = 1.
Coefficient of q^(2*n + 1) in q * (1 - q^4) * (1 - q^12) / ((1 - q^2) * (1 - q^6) * (1 - q^10)).
Euler transform of length 6 sequence [1, -1, 1, 0, 1, -1].
G.f.: (1 + x) * (1 + x^3) / (1 - x^5).
a(n) = a(-n) = a(n + 5) = A011558(n + 3) for all n in Z.
Period 5 sequence [1, 1, 0, 1, 1, ...].
a(n) = A130782(n) mod 2. - Antti Karttunen, Aug 31 2017
Showing 1-5 of 5 results.