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

A271832 Period 12 zigzag sequence: repeat [0,1,2,3,4,5,6,5,4,3,2,1].

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1
Offset: 0

Views

Author

Wesley Ivan Hurt, Apr 15 2016

Keywords

Comments

a(n)/36 is the probability that the sum shown after rolling a pair of standard dice is 1+(n mod 12). - Mathew Englander, Jul 11 2022
Decimal expansion of 37037/3000003. - Elmo R. Oliveira, Mar 03 2024

Crossrefs

Period k zigzag sequences: A000035 (k=2), A007877 (k=4), A260686 (k=6), A266313 (k=8), A271751 (k=10), this sequence (k=12), A279313 (k=14), A279319 (k=16), A158289 (k=18).

Programs

  • Magma
    &cat[[0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]: n in [0..10]];
    
  • Maple
    A271832:=n->[0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1][(n mod 12)+1]: seq(A271832(n), n=0..300);
  • Mathematica
    CoefficientList[Series[x*(1 + x + x^2 + x^3 + x^4 + x^5)/(1 - x + x^6 - x^7), {x, 0, 100}], x]
  • PARI
    lista(nn) = for(n=0, nn, print1(abs(n-12*round(n/12)), ", ")); \\ Altug Alkan, Apr 15 2016

Formula

G.f.: x*(1 + x + x^2 + x^3 + x^4 + x^5)/(1 - x + x^6 - x^7).
a(n) = a(n-1) - a(n-6) + a(n-7) for n>6.
a(n) = abs(n - 12*round(n/12)).
a(n) = Sum_{i=1..n} (-1)^floor((i-1)/6).
a(2n) = a(10n) = 2*A260686(n), a(2n+1) = A110551(n).
a(3n) = 3*A007877(n), a(4n) = a(8n) = 4*A011655(n).
a(6n) = A010677(n) = 6*A000035(n).
a(n) = a(n-12) for n >= 12. - Wesley Ivan Hurt, Sep 07 2022

A110569 Period 6: repeat [2, 1, 3, 3, 1, 2].

Original entry on oeis.org

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

Views

Author

Paul Barry, Jul 27 2005

Keywords

Comments

Permutation of {1, 2, 3}, followed by its reversal, repeated.

Crossrefs

Programs

Formula

a(n) = 1+(A078008(n) mod 3).
G.f.: (2-x+4*x^2-x^3+2*x^4) / (1-x+x^2-x^3+x^4-x^5).
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4.
a(n) = 2 + cos(2*Pi*n/3)/2 - sqrt(3)*sin(2*Pi*n/3)/2 - cos(Pi*n/3)/2 + sqrt(3)*sin(Pi*n/3)/6.
a(n) = a(n-6) for n>5. - Wesley Ivan Hurt, Jun 27 2016

Extensions

Name changed by Wesley Ivan Hurt, Jun 27 2016

A110568 Period 6: repeat [1, 0, 2, 2, 0, 1].

Original entry on oeis.org

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

Views

Author

Paul Barry, Jul 27 2005

Keywords

Comments

Permutation of {0, 1, 2}, followed by its reversal, repeated.

Crossrefs

Programs

  • Magma
    &cat [[1, 0, 2, 2, 0, 1]^^30]; // Wesley Ivan Hurt, Jun 28 2016
    
  • Maple
    A110568:=n->[1, 0, 2, 2, 0, 1][(n mod 6)+1]: seq(A110568(n), n=0..100); # Wesley Ivan Hurt, Jun 28 2016
  • Mathematica
    Mod[#,3]&/@CoefficientList[Series[(1-x)/(1-x-2x^2),{x,0,100}],x] (* Harvey P. Dale, Mar 30 2011 *)
    PadRight[{}, 100, {1, 0, 2, 2, 0, 1}] (* Wesley Ivan Hurt, Jun 28 2016 *)
    LinearRecurrence[{1,-1,1,-1,1},{1,0,2,2,0},100] (* Harvey P. Dale, Apr 03 2019 *)
  • PARI
    x='x+O('x^50); Vec((1-x+3*x^2-x^3+x^4)/(1-x+x^2-x^3+x^4-x^5)) \\ G. C. Greubel, Aug 31 2017

Formula

a(n) = A078008(n) mod 3.
G.f.: (1-x+3*x^2-x^3+x^4) / (1-x+x^2-x^3+x^4-x^5).
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4.
a(n) = 1 + cos(2*Pi*n/3)/2 - sqrt(3)*sin(2*Pi*n/3)/2 - cos(Pi*n/3)/2 + sqrt(3)*sin(Pi*n/3)/6.
a(n) = a(n-6) for n > 5. - Wesley Ivan Hurt, Jun 28 2016
a(n) = ((n-1)*(-1)^(n-1) mod 3). - Wesley Ivan Hurt, Jan 07 2021

Extensions

Name changed by Wesley Ivan Hurt, Jun 28 2016

A206543 Period 10: repeat 1, 3, 5, 7, 9, 9, 7, 5, 3, 1.

Original entry on oeis.org

1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1
Offset: 1

Views

Author

Wolfdieter Lang, Feb 09 2012

Keywords

Comments

For general Modd n (not to be confused with mod n) see a comment on A203571. The present sequence gives the residues Modd 11 for the positive odd numbers not divisible by 11, which are given in A204454.
The underlying period length 22 sequence with offset 0 is P_11, also called Modd11, periodic([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]).

Examples

			Residue Modd 11 of the positive odd numbers not divisible by 11:
A204454: 1, 3, 5, 7, 9, 13, 15, 17, 19, 21, 23, 25, 27, ...
Modd 11: 1, 3, 5, 7, 9,  9,  7,  5,  3,  1,  1,  3,  5, ...
		

Crossrefs

Cf. A000012 (Modd 3), A084101 (Modd 5), A110551 (Modd 7).

Programs

  • Mathematica
    PadRight[{},120,{1,3,5,7,9,9,7,5,3,1}] (* or *) LinearRecurrence[{2,-2,2,-2,1},{1,3,5,7,9},120] (* Harvey P. Dale, Oct 15 2017 *)
  • PARI
    a(n)=[1, 3, 5, 7, 9, 9, 7, 5, 3, 1][n%10+1] \\ Charles R Greathouse IV, Jul 17 2016

Formula

a(n) = A204454(n) (Modd 11) := Modd11(A204454(n)), with the periodic sequence Modd11 with period length 22 given in the comment section.
O.g.f.: x*(1+x^9+3*x*(1+x^7)+5*x^2*(1+x^5)+7*x^3*(1+x^3)+9*x^4*(1+x))/(1-x^10) = x*(1+x)*(1-x^5)/((1+x^5)*(1-x)^2).

A206544 Period 12: repeat 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1
Offset: 1

Views

Author

Wolfdieter Lang, Feb 09 2012

Keywords

Comments

For general Modd n (not to be confused with mod n) see a comment on A203571. The present sequence gives the residues Modd 13 of the positive odd numbers not divisible by 13, which are given in A204457.
The underlying periodic sequence with period length 26 is periodic([0,1,2,3,4,5,6,7,8,9,10,11,12,0,12,11,10,9,8,7,6,5,4,3,2,1]), called, with offset 0, P_13 or Modd13.

Examples

			Residue Modd 13 of the positive odd numbers not divisible by 13:
A204457: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, ...
Modd 13: 1, 3, 5, 7, 9, 11, 11,  9,  7,  5,  3,  1,  1,  3,  5,  7, ...
		

Crossrefs

Cf. A000012 (Modd 3), A084101 (Modd 5), A110551 (Modd 7), A206543 (Modd 11).

Programs

  • Mathematica
    LinearRecurrence[{1, 0, 0, 0, 0, -1, 1},{1, 3, 5, 7, 9, 11, 11},72] (* Ray Chandler, Aug 08 2015 *)
  • PARI
    a(n)=[1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3][n%12+1] \\ Charles R Greathouse IV, Jul 17 2016

Formula

a(n) = A204457(n) (Modd 13) := Modd13(A204457(n)), n>=1, with the period length 26 periodic sequence Modd13 given in the comment section.
O.g.f.: x*(1+x^11+3*x*(1+x^9)+5*x^2*(1+x^7)+7*x^3*(1+x^5)+9*x^4*(1+x^3)+11*x^5*(1+x))/(1-x^12) = x*(1-x^6)*(1+x)/((1+x^6)*(1-x)^2).

A206545 Period length 16: repeat 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1
Offset: 1

Views

Author

Wolfdieter Lang, Feb 09 2012

Keywords

Comments

For general Modd n see a comment on A203571. This sequence gives the Modd 17 residues of the odd numbers not divisible by 17, which are given in A204458.
The underlying periodic sequence with period length 34 is periodic (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 4, 3, 2, 1). This sequence with offset 0 is called P_17 or Modd17.

Examples

			Residue Modd 17 of the positive odd numbers not divisible by 17:
A204458: 1, 3, 5, 7, 9, 11, 13, 15, 19, 21, 23, 25, 27, 29,...
Modd 17: 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11,  9,  7,  5,...
		

Crossrefs

Cf. A000012 (Modd 3), A084101 (Modd 5), A110551 (Modd 7), A206543 (Modd 11), A206544 (Modd 13).

Programs

  • Mathematica
    PadRight[{},120,Join[Range[1,15,2],Range[15,1,-2]]] (* Harvey P. Dale, Sep 21 2018 *)

Formula

a(n) = A204458(n) (Modd 17) := Modd17(A204458(n)), n>=1, with the periodic sequence Modd17, with period length 34, defined in the comment section.
O.g.f.: x*(1+x^15+3*x*(1+x^13)+5*x^2*(1+x^11)+7*x^3*(1+x^9)+9*x^4*(1+x^7)+11*x^5*(1+x^5)+ 13*x^6*(1+x^3)+15*x^7*(1+x))/(1-x^16) = x*(1+x)^2*(1+x^2)*(1+x^4)/((1+x^8)*(1-x)).

A234255 Decimal expansion of -B(12) = 691/2730, 13th Bernoulli number without sign.

Original entry on oeis.org

0, 2, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5
Offset: 1

Views

Author

Paul Curtz, Dec 22 2013

Keywords

Comments

Essentially of period 6: repeat [5, 3, 1, 1, 3, 5] = A110551(n+3).
691*3663 = 2531133. See A021277.
Seventh part of the constant c=0.6323809537553113569215686274509803711... .
B(24) - B(12) = -86580. See A002882.

Examples

			0.2531135531135531135531135531135531135531135...
		

Crossrefs

Programs

  • Magma
    [0,2] cat &cat [[5, 3, 1, 1, 3, 5]^^30]; // Wesley Ivan Hurt, Jun 28 2016
  • Maple
    A234255:=n->[5, 3, 1, 1, 3, 5][(n mod 6)+1]: 0,2,seq(A234255(n), n=0..100); # Wesley Ivan Hurt, Jun 28 2016
  • Mathematica
    Join[{0},RealDigits[-BernoulliB[12],10,120][[1]]] (* or *) PadRight[{0,2}, 120, {3,5,5,3,1,1}] (* Harvey P. Dale, Dec 30 2013 *)
  • PARI
    default(realprecision, 120);
    -bernfrac(12) + 0. \\ Rick L. Shepherd, Jan 15 2014
    

Formula

From Chai Wah Wu, Jun 04 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3) for n > 5.
G.f.: x^2*(2 + x - 3*x^2 + 3*x^3)/((1 - x)*(1 - x + x^2)). (End)
From Wesley Ivan Hurt, Jun 28 2016: (Start)
a(n) = a(n-6) for n>8.
a(n) = (9 - 6*cos(n*Pi/3) + 2*sqrt(3)*sin(n*Pi/3))/3 for n>2. (End)

Extensions

Offset corrected by and more terms from Rick L. Shepherd, Jan 15 2014
Showing 1-7 of 7 results.