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

A203571 Period length 10: [0, 1, 2, 3, 4, 0, 4, 3, 2, 1] repeated.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Jan 11 2012

Keywords

Comments

This sequence can be continued periodically for negative values of n.
This is the fifth sequence of a k-family of sequences P_k, k>=1, which starts with A000007(n+1), n >= 0 (the 0-sequence), A000035, A193680, A193682, for k = 1, ..., 4, respectively.
In general, the sequence P_k, k >= 1 (periodically continued for negative values of n), is used to define the k equivalence classes [0], [1], ..., [k-1], with [j] := {n integer| P_k(n) = j}. Two integers are equivalent if and only if they are mapped by P_k to the same value. For P_5, P_6 and P_7 see the arrays (not the triangles) A090298, A092260 and A113807, respectively. In each of these cases the class [k] should be replaced by the class [0], and also negative n-values are allowed. Multiplication can be done class-wise. E.g., k = 5: P_5(n) = a(n), 7*12 == 3*2 = 6 == 4; a(7*12) = a(a(7)*a(12)) = a(3*2) = 4. This kind of multiplication could be called multiplication Modd n, in order to distinguish it from multiplication mod n. Addition cannot be done class-wise. E.g., k = 5: 7 + 12 = 19 == 1 is not equivalent to 3 + 2 = 5 == 0; a(7+12) = 1 is not equal to a(a(7) + a(12)) = a(3+2) = 0.
Periodic sequences of this type can be also calculated by a(n) = c + floor(q/(p^m-1)*p^n) mod p, where c is a constant, q is the number representing the periodic digit pattern and m is the period length. c, p and q can be calculated as follows: Let D be the array representing the number pattern to be repeated, m = size of D, max = maximum value of elements in D, min = minimum value of elements in D. Then c := min, p := max - min + 1 and q := p^m * Sum_{i=0..(m-1)} (D(i) - min)/p^i. Example: D = (0, 1, 2, 3, 4, 0, 4, 3, 2, 1), c = 0, m = 10, p = 5 and q = 3034180 for this sequence. - Hieronymus Fischer, Jan 04 2013 [Corrected by Rémi Guillaume, Aug 28 2024]
For periodic sequences with terms < 10 one can use the well-known fact that ab..z/99..9 = 0.ab..zab..zab..z... (infinite periodic decimal fraction), this leads to one of the given formulas. For the general case it is sufficient to shift the terms to nonnegative values and to switch to a sufficiently large basis instead of 10 (there are infinitely many choices). - M. F. Hasler, Jan 13 2013

Examples

			a(12) = 12 mod 5 = 2 since 12\5 = floor(12/5) = 2 is even; the sign is +1.
a(7) = -7 mod 5 = 3 since 7\5 = floor(7/5) = 1 is odd; the sign is -1.
		

Crossrefs

Programs

Formula

a(n) = n mod 5 if (-1)^floor(n/5) = +1 else -n mod 5, n >= 0. (-1)^floor(n/5) is the sign corresponding to the parity of the quotient floor(n/5). This quotient is sometimes denoted by n\5.
O.g.f.: x*(1+2*x+3*x^2+4*x^3+4*x^5+3*x^6+2*x^7+x^8)/(1-x^10) = -x*(1 +2*x +3*x^2 +4*x^3 +4*x^5 +3*x^6 +2*x^7 +x^8) / ( (x-1) *(1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1) ).
a(n) = (2/5)*cos(Pi*n) - cos(4*Pi*n/5) - (1/5)*cos(3*Pi*n/5) + (2/5)*5^(1/2)*cos(3*Pi*n/5) - cos(2*Pi*n/5) - (1/5)*cos(Pi*n/5) - (2/5)*5^(1/2)*cos(Pi*n/5) + 2. - Leonid Bedratyuk, May 13 2012
a(n) = floor(123404321/9999999999*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 04 2013
a(n) = floor(151709/2441406*5^(n+1)) mod 5. - Hieronymus Fischer, Jan 04 2013
a(n) = (5-abs(n-(10*ceiling(n/10)-5)))*(ceiling((n+5)/10)-floor((n+5)/10)). - Wesley Ivan Hurt, Mar 26 2014 [corrected by Jason Yuen, Feb 17 2025]
a(n+10) = a(n) for n in Z; a(-n) = a(n) for n in Z. - Rémi Guillaume, Aug 28 2024

A113801 Numbers that are congruent to {1, 13} mod 14.

Original entry on oeis.org

1, 13, 15, 27, 29, 41, 43, 55, 57, 69, 71, 83, 85, 97, 99, 111, 113, 125, 127, 139, 141, 153, 155, 167, 169, 181, 183, 195, 197, 209, 211, 223, 225, 237, 239, 251, 253, 265, 267, 279, 281, 293, 295, 307, 309, 321, 323, 335, 337, 349, 351, 363, 365, 377, 379
Offset: 1

Views

Author

Giovanni Teofilatto, Jan 22 2006

Keywords

Comments

If 14k+1 is a perfect square..(0,12,16,52,60,120..) then the square root of 14k+1 = a(n) - Gary Detlefs, Feb 22 2010
More generally, these numbers are of the form (2*h*n+(h-4)*(-1)^n-h)/4 (h, n natural numbers), therefore ((2*h*n+(h-4)*(-1)^n-h)/4)^2-1==0 (mod h); in our case, a(n)^2-1==0 (mod 14). Also a(n)^2-1==0 (mod 28). - Bruno Berselli, Oct 26 2010 - Nov 17 2010

Crossrefs

Programs

  • Haskell
    a113801 n = a113801_list !! (n-1)
    a113801_list = 1 : 13 : map (+ 14) a113801_list
    -- Reinhard Zumkeller, Jan 07 2012
    
  • Mathematica
    LinearRecurrence[{1,1,-1},{1,13,15},60] (* or *) Select[Range[500], MemberQ[{1,13},Mod[#,14]]&] (* Harvey P. Dale, May 11 2011 *)
  • PARI
    a(n)=n\2*14-(-1)^n \\ Charles R Greathouse IV, Sep 15 2015

Formula

a(n) = 14*(n-1)-a(n-1), n>1. - R. J. Mathar, Jan 30 2010
From Bruno Berselli, Oct 26 2010: (Start)
a(n) = -a(-n+1) = (14*n+5*(-1)^n-7)/2.
G.f.: x*(1+12*x+x^2)/((1+x)*(1-x)^2).
a(n) = a(n-2)+14 for n>2.
a(n) = 14*A000217(n-1)+1 - 2*sum[i=1..n-1] a(i) for n>1. (End)
a(0)=1, a(1)=13, a(2)=15, a(n)=a(n-1)+a(n-2)-a(n-3). - Harvey P. Dale, May 11 2011
Sum_{n>=1} (-1)^(n+1)/a(n) = (Pi/14)*cot(Pi/14). - Amiram Eldar, Dec 04 2021
E.g.f.: 1 + ((14*x - 7)*exp(x) + 5*exp(-x))/2. - David Lovler, Sep 04 2022
From Amiram Eldar, Nov 25 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 2*cos(Pi/14).
Product_{n>=2} (1 + (-1)^n/a(n)) = (Pi/14)*cosec(Pi/14). (End)

Extensions

Corrected and extended by Giovanni Teofilatto, Nov 14 2008
Replaced the various formulas by a correct one - R. J. Mathar, Jan 30 2010

A092260 Permutation of natural numbers generated by 6-rowed array shown below.

Original entry on oeis.org

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

Views

Author

Giovanni Teofilatto, Feb 19 2004

Keywords

Comments

1 11 13 23 25 35 37 47 49 59... (A091998)
2 10 14 22 26 34 38 46 50 58... (A091999)
3 9 15 21 27 33 39 45 51 57... (A016945)
4 8 16 20 28 32 40 44 52 56... (A092259)
5 7 17 19 29 31 41 43 53 55... (A092242)
6 12 18 24 30 36 42 48 54 60... (A008588, excluding initial term)
For such arrays A_k, here A_6, see a W. Lang comment on A113807, the A_7 case. However, to get the array A_6 one should take the last line as the first one and add a 0 in front (thus obtaining a permutation of the nonnegative integers). - Wolfdieter Lang, Feb 02 2012

Crossrefs

Extensions

Edited and extended by Ray Chandler, Feb 21 2004

A090298 Permutation of natural numbers generated by 5-row array shown below.

Original entry on oeis.org

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

Views

Author

Giovanni Teofilatto, Jan 25 2004

Keywords

Comments

1 9 11 19 21 29 31 39... (A090771)
2 8 12 18 22 28 32 38... (A090772)
3 7 13 17 23 27 33 37... (A063226)
4 6 14 16 24 26 34 36... (A090773)
5 10 15 20 25 30 35 40... (A008587, excluding initial term)
-----------------------------------------------------------
For such arrays A_k, here A_5, see a W. Lang comment on A113807, the A_7 case. However, in order to obtain A_5 one should take the last row as the first one after adding a 0 in front (thus getting a permutation of the nonnegative integers). - Wolfdieter Lang, Feb 02 2012

Crossrefs

Extensions

More terms from Ray Chandler, Feb 01 2004

A113804 Numbers that are congruent to 4 or 10 mod 14.

Original entry on oeis.org

4, 10, 18, 24, 32, 38, 46, 52, 60, 66, 74, 80, 88, 94, 102, 108, 116, 122, 130, 136, 144, 150, 158, 164, 172, 178, 186, 192, 200, 206, 214, 220, 228, 234, 242, 248, 256, 262, 270, 276, 284, 290, 298, 304, 312, 318, 326, 332, 340, 346, 354, 360
Offset: 1

Views

Author

Giovanni Teofilatto, Jan 22 2006

Keywords

Comments

Fourth row of the 7-rowed array A113807. - Giovanni Teofilatto, Oct 26 2009 [crossref added by Wolfdieter Lang, Dec 15 2011]

Crossrefs

Programs

  • Mathematica
    Select[Range[2,400,2],MemberQ[{4,10},Mod[#,14]]&] (* or *) LinearRecurrence[{1,1,-1},{4,10,18},60] (* Harvey P. Dale, Jan 08 2023 *)
  • PARI
    a(n)=7*n-((-1)^n+7)/2 \\ Charles R Greathouse IV, Dec 27 2011

Formula

From R. J. Mathar, Aug 13 2008: (Start)
a(n) = 7n - ((-1)^n + 7)/2.
G.f.: 2x*(2 + 3x + 2x^2)/((1-x)^2*(1+x)). (End)
a(n) = 14*n - a(n-1) - 14 (with a(1)=4). - Vincenzo Librandi, Aug 01 2010
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(3*Pi/14)*Pi/14. - Amiram Eldar, Dec 30 2021
E.g.f.: 4 + ((14*x - 7)*exp(x) - exp(-x))/2. - David Lovler, Sep 04 2022
a(n) = 2*A047385(n). - Michel Marcus, Sep 05 2022
From Amiram Eldar, Nov 25 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = cosec(Pi/7)/2.
Product_{n>=1} (1 + (-1)^n/a(n)) = tan(3*Pi/14). (End)

Extensions

More terms from Neven Juric, Apr 10 2008

A110551 Period 6: repeat [1, 3, 5, 5, 3, 1].

Original entry on oeis.org

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
Offset: 0

Views

Author

Paul Barry, Jul 26 2005

Keywords

Comments

a(n) = A162699(n+1) (Modd 7) = A204453(A162699(n+1)), n>=0, where the nonnegative members of the seven residue classes Mod 7 (not to be confused with mod 7), called [m] for m=0..6, are given in the array A113807, if there the last row, starting with 7 is taken as class [0] after adding a 0 in front. Here only the classes [1], [3] and [5] are relevant. For Modd n residue classes see a comment on A203571. [Wolfdieter Lang, Feb 09 2012]
Continued fractions expansion of (8+sqrt(905))/29 = 1.3132144107925.. - R. J. Mathar, Mar 08 2012

Examples

			Modd 7 classes for positive odd numbers reduced mod 7: a(3)=5 because A162699(4)=9 (the fourth positive odd number not divisible by 7), and 9 is a member of the Modd 7 class [5] = {5,9,19,23,...}.
A162699: 1, 3, 5, 9, 11, 13, 15, 17, 19, 23, 25, 27,...
Modd 7:  1, 3, 5, 5,  3,  1,  1,  3,  5,  5,  3,  1,... [_Wolfdieter Lang_, Feb 09 2012]
		

Crossrefs

Programs

Formula

From R. J. Mathar, Oct 15 2014: (Start)
G.f.: ( 1+x+x^2 ) / ( (1-x)*(x^2-x+1) ).
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4.
a(n) = 3 + 2*sin(Pi*n/3)/sqrt(3) - 2*cos(Pi*n/3).
a(n) = A001045(n+2) mod 6. (End)
From Wesley Ivan Hurt, Jun 29 2016: (Start)
a(n) = a(n-6) for n>5.
a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3) for n>2. (End)

A088520 Permutation of natural numbers generated by 3-rowed array shown below.

Original entry on oeis.org

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

Views

Author

Giovanni Teofilatto, Nov 14 2003

Keywords

Comments

1 5 7 11 13 17 19 23 25 29 31 35 37 41 43...
2 4 8 10 14 16 20 22 26 28 32 34 38 40 44...
3 6 9 12 15 18 21 24 27 30 33 36 39 42 45...

References

  • M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988
  • Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta,UTET, CittaStudiEdizioni, Milano 1997

Crossrefs

Extensions

Corrected and extended by Ray Chandler, Nov 16 2003

A113803 Numbers that are congruent to {3, 11} mod 14.

Original entry on oeis.org

3, 11, 17, 25, 31, 39, 45, 53, 59, 67, 73, 81, 87, 95, 101, 109, 115, 123, 129, 137, 143, 151, 157, 165, 171, 179, 185, 193, 199, 207, 213, 221, 227, 235, 241, 249, 255, 263, 269, 277, 283, 291, 297, 305, 311, 319, 325, 333, 339, 347, 353, 361, 367
Offset: 1

Views

Author

Giovanni Teofilatto, Jan 22 2006

Keywords

Crossrefs

Programs

  • Mathematica
    {3+#,11+#}&/@(14*Range[0,30])//Flatten (* Harvey P. Dale, Jun 28 2020 *)

Formula

a(n) = 14*n - a(n-1) - 14 (with a(1) = 3). - Vincenzo Librandi, Nov 13 2010
From Wolfdieter Lang, Dec 15 2011: (Start)
a(n) = 7*n-(7-(-1)^n)/2.
O.g.f.: x*(3+8*x+3*x^2)/((1+x)*(1-x)^2).
See the Bruno Berselli contribution under A113801. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(3*Pi/14)*Pi/14. - Amiram Eldar, Dec 30 2021
From Amiram Eldar, Nov 25 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = cot(3*Pi/14).
Product_{n>=1} (1 + (-1)^n/a(n)) = sin(Pi/7)*cosec(3*Pi/14). (End)

A113802 Numbers that are congruent to {2, 12} mod 14.

Original entry on oeis.org

2, 12, 16, 26, 30, 40, 44, 54, 58, 68, 72, 82, 86, 96, 100, 110, 114, 124, 128, 138, 142, 152, 156, 166, 170, 180, 184, 194, 198, 208, 212, 222, 226, 236, 240, 250, 254, 264, 268, 278, 282, 292, 296, 306, 310, 320, 324, 334, 338, 348, 352, 362, 366, 376, 380
Offset: 1

Views

Author

Giovanni Teofilatto, Jan 22 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[400],MemberQ[{2,12},Mod[#,14]]&] (* Harvey P. Dale, Oct 30 2011 *)

Formula

a(n) = 14*n - a(n-1) - 14 (with a(1) = 2). - Vincenzo Librandi, Nov 13 2010
From Wolfdieter Lang, Dec 15 2011: (Start)
a(n) = 7*n-(7-3*(-1)^n)/2.
O.g.f.: 2*x*(1+5*x+x^2)/((1+x)*(1-x)^2).
See the contribution of Bruno Berselli under A113801. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(Pi/7)*Pi/14. - Amiram Eldar, Dec 30 2021
From Amiram Eldar, Nov 25 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = cosec(Pi/7)*sin(3*Pi/14).
Product_{n>=1} (1 + (-1)^n/a(n)) = cosec(Pi/7)*sin(Pi/14). (End)

A113805 Numbers that are congruent to {5, 9} mod 14.

Original entry on oeis.org

5, 9, 19, 23, 33, 37, 47, 51, 61, 65, 75, 79, 89, 93, 103, 107, 117, 121, 131, 135, 145, 149, 159, 163, 173, 177, 187, 191, 201, 205, 215, 219, 229, 233, 243, 247, 257, 261, 271, 275, 285, 289, 299, 303, 313, 317, 327, 331, 341, 345, 355, 359, 369
Offset: 1

Views

Author

Giovanni Teofilatto, Jan 22 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[14n + {5, 9}, {n, 0, 28}]] (* Alonso del Arte, Dec 15 2011 *)

Formula

a(n) = 14*n - a(n-1) - 14 (with a(1) = 5). - Vincenzo Librandi, Nov 13 2010
From Wolfdieter Lang, Dec 15 2011: (Start)
a(n) = 7*n-(7+3*(-1)^n)/2.
O.g.f.: x*(5+4*x+5*x^2)/((1+x)*(1-x)^2).
See the Bruno Berselli contribution under A113801. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(Pi/7)*Pi/14. - Amiram Eldar, Dec 30 2021
From Amiram Eldar, Nov 25 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 4*sin(Pi/7)*sin(3*Pi/14).
Product_{n>=1} (1 + (-1)^n/a(n)) = 2*sin(Pi/7). (End)
Showing 1-10 of 15 results. Next