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

A028355 How the astronomical clock ("Orloj") in Prague would strike 1,2,3,...,24,25,.. (digits follow 12343212343... (A028356), n-th group adds to n).

Original entry on oeis.org

1, 2, 3, 4, 32, 123, 43, 2123, 432, 1234, 32123, 43212, 34321, 23432, 123432, 1234321, 2343212, 3432123, 4321234, 32123432, 123432123, 43212343, 2123432123, 432123432, 1234321234, 32123432123, 43212343212
Offset: 1

Views

Author

Keywords

Comments

This remarkable sequence is really a sequence of lists rather than numbers.

Examples

			1, 2, 3, 4, 3+2=5, 1+2+3=6, 4+3=7, 2+1+2+3=8, 4+3+2=9, 1+2+3+4=10, 3+2+1+2+3=11, 4+3+2+1+2=12, 3+4+3+2+1=13, 2+3+4+3+2=14, 1+2+3+4+3+2=15, ...
		

References

  • Zdenek Horsky, "Prazsky Orloj" ["The Astronomical Clock of Prague", in Czech], Panorama, Prague, 1988, pp. 76-78.

Crossrefs

Programs

  • Mathematica
    s[i_] := {1, 2, 3, 4, 3, 2}[[Mod[i, 6, 1]]];
    m[k_] := If[k == 1, 0, For[m0 = 1, True, m0++, If[k (k - 1)/2 == Sum[s[i], {i, 1, m0}], Return[m0]]]];
    n[k_] := For[n0 = m[k] + 1, True, n0++, If[Sum[s[i], {i, m[k] + 1, n0}] == k, Return[n0]]];
    a[k_] := a[k] = Table[s[i], {i, m[k] + 1, n[k]}] // FromDigits; Array[a, 27] (* Jean-François Alcover, Mar 14 2016 *)

Formula

Conjectures from Chai Wah Wu, Apr 18 2024: (Start)
a(n) = 1000001*a(n-15) - 1000000*a(n-30) for n > 30.
G.f.: x*(100000*x^28 + 200000*x^27 + 300000*x^26 + 400000*x^25 + 320000*x^24 + 123000*x^23 + 430000*x^22 + 212300*x^21 + 432000*x^20 + 123400*x^19 + 321230*x^18 + 432120*x^17 + 343210*x^16 + 234320*x^15 + 123432*x^14 + 23432*x^13 + 34321*x^12 + 43212*x^11 + 32123*x^10 + 1234*x^9 + 432*x^8 + 2123*x^7 + 43*x^6 + 123*x^5 + 32*x^4 + 4*x^3 + 3*x^2 + 2*x + 1)/(1000000*x^30 - 1000001*x^15 + 1). (End)

A028354 How the astronomical clock ("Orloj") in Prague strikes the hours (digits follow 12343212343... (A028356), n-th group adds to n).

Original entry on oeis.org

1, 2, 3, 4, 32, 123, 43, 2123, 432, 1234, 32123, 43212, 34321, 23432, 123432, 1234321, 2343212, 3432123, 4321234, 32123432, 123432123, 43212343, 2123432123, 432123432, 1, 2, 3, 4, 32, 123, 43, 2123, 432, 1234, 32123, 43212
Offset: 1

Views

Author

Keywords

Comments

There is a single bell, which to indicate 5 o'clock, say, strikes thrice then twice.

References

  • Zdenek Horsky, "Prazsky Orloj" ["The Astronomical Clock of Prague", in Czech], Panorama, Prague, 1988, pp. 76-78.

Crossrefs

Programs

  • Mathematica
    s[i_] := {1, 2, 3, 4, 3, 2}[[Mod[i, 6, 1]]]; m[k_] := If[ k == 1, 0, For[m0 = 1, True, m0++, If[k(k-1)/2 == Sum[ s[i], {i, 1, m0}], Return[m0]]]]; n[k_] := For[n0 = m[k]+1, True, n0++, If[Sum[s[i], {i, m[k]+1, n0}] == k, Return[n0]]]; a[k_] := a[k] = If[k>24, a[k-24], Table[ s[i], {i, m[k]+1, n[k]}] // FromDigits]; Array[a, 36] (* Jean-François Alcover, Mar 13 2016 *)

A068962 Number of successive terms of A028356 that add to n; or length of n-th term of A028355.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 4, 3, 4, 5, 5, 5, 5, 6, 7, 7, 7, 7, 8, 9, 8, 10, 9, 10, 11, 11, 11, 11, 12, 13, 13, 13, 13, 14, 15, 14, 16, 15, 16, 17, 17, 17, 17, 18, 19, 19, 19, 19, 20, 21, 20, 22, 21, 22, 23, 23, 23, 23, 24, 25, 25, 25, 25, 26, 27, 26, 28, 27, 28, 29, 29, 29, 29, 30, 31, 31
Offset: 1

Views

Author

N. J. A. Sloane, Apr 08 2002

Keywords

References

Crossrefs

Formula

Each group of 15 terms is 6 more than the previous group.
Conjectures from Chai Wah Wu, Apr 18 2024: (Start)
a(n) = a(n-1) + a(n-15) - a(n-16) for n > 16.
G.f.: x*(x^14 + x^10 + x^9 - x^8 + 2*x^7 - x^6 + x^5 + x^4 + 1)/(x^16 - x^15 - x + 1). (End)

Extensions

More terms from Jim McCann (jmccann(AT)umich.edu), Jul 16 2002

A028357 Partial sums of A028356.

Original entry on oeis.org

1, 3, 6, 10, 13, 15, 16, 18, 21, 25, 28, 30, 31, 33, 36, 40, 43, 45, 46, 48, 51, 55, 58, 60, 61, 63, 66, 70, 73, 75, 76, 78, 81, 85, 88, 90, 91, 93, 96, 100, 103, 105, 106, 108, 111, 115, 118, 120, 121, 123, 126
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A047401. - Jeremy Gardiner, Jul 20 2013.

Formula

G.f.: ( 1+x+2*x^3+x^2 ) / ( (1+x)*(x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Dec 15 2015

A158289 Period 18 zigzag sequence: repeat [0,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1].

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Mar 15 2009

Keywords

Comments

A toothed or zigzag sequence.
Sequence contains only numbers 0..9; abs(a(n+1)-a(n)) = 1.
Decimal expansion of 12345679/1000000001. - Elmo R. Oliveira, Feb 20 2024

Crossrefs

Cf. A068073 (repeat 1,2,3,2), A028356 (repeat 1,2,3,4,3,2), A130784 (repeat 1,3,2).
Period k zigzag sequences: A000035 (k=2), A007877 (k=4), A260686 (k=6), A266313 (k=8), A271751 (k=10), A271832 (k=12), A279313 (k=14), A279319 (k=16), this sequence (k=18).

Programs

  • Magma
    [ s lt 9 select r else 9-r where r is n mod 9 where s is n mod 18: n in [0..104] ]; // Klaus Brockhaus, Sep 07 2009
    
  • Magma
    S:=[]; a:=0; for n in [0..104] do Append(~S, a); if n mod 18 eq 0 then d:=1; else if n mod 9 eq 0 then d:=-1; end if; end if; a+:=d; end for; S; // Klaus Brockhaus, Sep 07 2009
    
  • Magma
    &cat[[0,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1]: n in [0..5]]; // Vincenzo Librandi, Jul 26 2015
    
  • Mathematica
    a[n_] := If[m = Mod[n, 18]; m <= 9, m, 18-m]; Table[a[n], {n, 0, 85}] (* Jean-François Alcover, Jul 19 2013 *)
    PadRight[{}, 100, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1}] (* Vincenzo Librandi, Jul 26 2015 *)
  • PARI
    a(n)=abs(n-round(n/18)*18) \\ M. F. Hasler, Jul 27 2015

Formula

a(18*k+j) = a(18*(k+1)-j) = j for k >= 0, j = 0..9.
G.f.: x*(1+x+x^2)*(1+x^3+x^6)/((1-x)*(1+x)*(1-x+x^2)*(1-x^3+x^6)). - Klaus Brockhaus, Sep 07 2009
a(n) = Sum_{i=0..n-1} (-1)^floor(i/9). - Wesley Ivan Hurt, Jul 25 2015
a(n) = abs(n - 18*round(n/18)). - Wesley Ivan Hurt, Dec 10 2016
a(n) = a(n-18) for n >= 18. - Wesley Ivan Hurt, Sep 07 2022

Extensions

Edited and extended by Klaus Brockhaus, Sep 07 2009

A068073 Period 4 sequence [ 1, 2, 3, 2, ...].

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Mar 01 2002

Keywords

Comments

Continued fraction expansion of (2+sqrt(14))/4. - Klaus Brockhaus, May 01 2010
The sequence is like a sawtooth wave of period 4. - Michael Somos, Feb 13 2011

Examples

			G.f. = 1 + 2*x + 3*x^2 + 2*x^3 + x^4 + 2*x^5 + 3*x^6 + 2*x^7 + x^8 + 2*x^9 + ...
		

Crossrefs

Cf. A177033 (decimal expansion of (2+sqrt(14))/4). - Klaus Brockhaus, May 01 2010

Programs

  • Mathematica
    CoefficientList[ Series[(1 + 2x + 3x^2 + 2x^3)/(1 - x^4), {x, 0, 85}], x]
    a[ n_] := {2, 3, 2, 1}[[Mod[n, 4, 1]]]; (* Michael Somos, Apr 17 2015 *)
    PadRight[{},120,{1,2,3,2}] (* Harvey P. Dale, Jun 13 2020 *)
  • PARI
    {a(n) = [1, 2, 3, 2] [n%4 + 1]}; /* Michael Somos, Feb 13 2011 */
    
  • PARI
    {a(n) = n%4 + 1 - 2 * (n%4 == 3)}; /* Michael Somos, Feb 13 2011 */
    
  • PARI
    {a(n) = 2 + kronecker( -4, n-1)}; /* Michael Somos, Feb 13 2011 */

Formula

G.f.: (1 + 2*x + 3*x^2 + 2*x^3) / (1 - x^4).
Conjecture: a(n) = Sum_{k=0..n} e^(i*Pi*(A000120(A001045(n)) - A001045(A000120(n)))), i=sqrt(-1). - Paul Barry, Jan 14 2005
From Paul Barry, Jan 14 2005: (Start)
G.f.: (1 + x + 2x^2)/(1 - x + x^2 - x^3);
a(n) = 2 - cos(Pi*n/2). (End)
Moebius transform is length 4 sequence [2, 1, 0, -2]. - Michael Somos, Feb 13 2011
a(n) = 2 - A056594(n). - Bruno Berselli, Mar 10 2011
a(n) = a(-n) = a(n+4) for all n in Z. - Michael Somos, Apr 17 2015
2 * a(n) = A164356(n) unless n=0. - Michael Somos, Apr 17 2015
G.f.: 1 / (1 - 2*x / (1 + x / (2 - 5*x / (1 + 16*x / (5 - x))))). - Michael Somos, Jan 20 2017
G.f.: 2 / (1 - x) - 1 / (1 + x^2). - Michael Somos, Jan 07 2019
a(n) = abs(((n+2) mod 4)-2) + 1. - Daniel Jiménez, Jan 14 2023

A175922 Period 5: repeat [1, 1, 2, -1, 2].

Original entry on oeis.org

1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2
Offset: 1

Views

Author

Jaroslav Krizek, Oct 17 2010

Keywords

Crossrefs

Programs

Formula

a(n) = 1 + (2/5)*(cos(2*n*Pi/5) + cos(4*n*Pi/5) - 2*cos(2*(n+1)*Pi/5) - sin((4*n+3)*Pi/10) + 2*sin((8*n+3)*Pi/10) + sin((8*n+1)*Pi/10)). - Wesley Ivan Hurt, Sep 27 2018
G.f.: x*(1 + x + 2*x^2 - x^3 + 2*x^4) / (1 - x^5). - Vincenzo Librandi, Sep 28 2018
a(n) = a(n-5). - Wesley Ivan Hurt, Jun 25 2022

Extensions

Edited by Joerg Arndt, Sep 16 2013

A177924 Decimal expansion of (28+sqrt(2730))/56.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, May 15 2010

Keywords

Comments

Continued fraction expansion of (28+sqrt(2730))/56 is A028356.

Examples

			(28+sqrt(2730))/56 = 1.43302503411522366596...
		

Crossrefs

Cf. A177925 (decimal expansion of sqrt(2730)), A028356 (repeat 1, 2, 3, 4, 3, 2).

Programs

  • Mathematica
    RealDigits[(28+Sqrt[2730])/56,10,120][[1]] (* Harvey P. Dale, Mar 19 2023 *)

A187601 n/2 times period 6 sequence [1, 2, 3, 4, 3, 2, ...].

Original entry on oeis.org

0, 1, 3, 6, 6, 5, 3, 7, 12, 18, 15, 11, 6, 13, 21, 30, 24, 17, 9, 19, 30, 42, 33, 23, 12, 25, 39, 54, 42, 29, 15, 31, 48, 66, 51, 35, 18, 37, 57, 78, 60, 41, 21, 43, 66, 90, 69, 47, 24, 49, 75, 102, 78, 53, 27, 55, 84, 114, 87, 59, 30, 61, 93, 126, 96, 65, 33, 67, 102
Offset: 0

Views

Author

Bruno Berselli, Mar 11 2011

Keywords

Comments

A007310 is a subsequence.

Crossrefs

Cf. A186813.
Cf. A109044, A088439 (by Superseeker).

Programs

  • Magma
    [(n/2)*[1, 2, 3, 4, 3, 2][n mod 6 + 1]: n in [0..68]]; /* Other: */ [n*(5-2*(-1)^Floor((n+1)/3)-(-1)^n)/4: n in [0..68]];
  • Mathematica
    CoefficientList[Series[x (1 + x + x^2 - x^3 + x^4 + x^5 + x^6) / ((1 - x)^2 (1 + x)^2 (1 - x + x^2)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Aug 19 2013 *)
    LinearRecurrence[{2,-1,-2,4,-2,-1,2,-1},{0,1,3,6,6,5,3,7},90] (* Harvey P. Dale, Aug 20 2017 *)

Formula

a(n) = (n/2)*A028356(n).
G.f.: x*(1+x+x^2-x^3+x^4+x^5+x^6)/((1-x)^2*(1+x)^2*(1-x+x^2)^2).
a(-n) = -a(n). a(n) = 2*a(n-1)-a(n-2)-2*a(n-3)+4*a(n-4)-2*a(n-5)-a(n-6)+2*a(n-7)-a(n-8) for n>7.
a(n) = n*(5-2*(-1)^floor((n+1)/3)-(-1)^n)/4.

A164360 Period 3: repeat [5, 4, 3].

Original entry on oeis.org

5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 3
Offset: 0

Views

Author

Stephen Crowley, Aug 14 2009

Keywords

Comments

From Klaus Brockhaus, May 29 2010: (Start)
Continued fraction expansion of (32+sqrt(1297))/13.
Decimal expansion of 181/333. (End)

Crossrefs

Cf. A007877 (repeat 0,1,2,1), A068073 (repeat 1,2,3,2), A028356 (repeat 1,2,3,4,3,2), A130784 (repeat 1,3,2), A158289 (repeat 0,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1).
Cf. A178566 (decimal expansion of (32+sqrt(1297))/13). [Klaus Brockhaus, May 29 2010]

Programs

Formula

a(n) = 4+(-1)^n*((1/2+I*sqrt(3)/6)*((1+I*sqrt(3))/2)^n+(1/2-I*sqrt(3)/6)*((1-I*sqrt(3))/2)^n). [Corrected by Klaus Brockhaus, Sep 17 2009]
a(n) = 4+(1/3)*sqrt(3)*sin(2*n*Pi/3)+cos(2*n*Pi/3). [Corrected by Klaus Brockhaus, Sep 17 2009]
a(n) = a(n-3) for n > 2, with a(0) = 5, a(1) = 4, a(2) = 3.
G.f.: (5+4*x+3*x^2)/((1-x)*(1+x+x^2)). [Klaus Brockhaus, Sep 17 2009]
E.g.f.: 4*exp(x)+(1/3)*sqrt(3)*exp(-(1/2)*x)*sin((1/2)*x*sqrt(3))+exp(-(1/2)*x)*cos((1/2)*x*sqrt(3)).
a(n) = 4 + A057078(n). - Wesley Ivan Hurt, Jul 01 2016

Extensions

Edited by Klaus Brockhaus, Sep 17 2009
Offset changed to 0 and formulas adjusted by Klaus Brockhaus, May 18 2010
Showing 1-10 of 13 results. Next