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.

A028356 Simple periodic sequence underlying clock sequence A028354.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Klaus Brockhaus, May 15 2010: (Start)
Continued fraction expansion of (28+sqrt(2730))/56.
Decimal expansion of 1112/9009.
Partial sums of 1 followed by A130151.
First differences of A028357. (End)

References

  • Zdeněk Horský, "Pražský orloj" ("The Astronomical Clock of Prague", in Czech), Panorama, Prague, 1988, pp. 76-78.

Crossrefs

Cf. A177924 (decimal expansion of (28+sqrt(2730))/56), A130151 (repeat 1, 1, 1, -1, -1, -1), A028357 (partial sums of A028356). - Klaus Brockhaus, May 15 2010

Programs

  • Magma
    &cat [[1, 2, 3, 4, 3, 2]^^20]; // Klaus Brockhaus, May 15 2010
    
  • Maple
    A028356:=n->[1, 2, 3, 4, 3, 2][(n mod 6)+1]: seq(A028356(n), n=0..100); # Wesley Ivan Hurt, Jun 23 2016
  • Mathematica
    CoefficientList[ Series[(1 + 2x + 3x^2 + 4x^3 + 3x^4 + 2x^5)/(1 - x^6), {x, 0, 85}], x]
    LinearRecurrence[{1,0,-1,1},{1,2,3,4},120] (* or *) PadRight[{},120,{1,2,3,4,3,2}] (* Harvey P. Dale, Apr 15 2016 *)
  • Python
    def A028356(n): return (1,2,3,4,3,2)[n%6] # Chai Wah Wu, Apr 18 2024
  • Sage
    def A():
        a, b, c, d = 1, 2, 3, 4
        while True:
            yield a
            a, b, c, d = b, c, d, a + (d - b)
    A028356 = A(); [next(A028356) for n in range(106)] # Peter Luschny, Jul 26 2014
    

Formula

Sum of any six successive terms is 15.
G.f.: (1 + 2*x + 3*x^2 + 4*x^3 + 3*x^4 + 2*x^5)/(1 - x^6).
From Wesley Ivan Hurt, Jun 23 2016: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
a(n) = (15 - cos(n*Pi) - 8*cos(n*Pi/3))/6. (End)
E.g.f.: (15*exp(x) - exp(-x) - 8*cos(sqrt(3)*x/2)*(sinh(x/2) + cosh(x/2)))/6. - Ilya Gutkovskiy, Jun 23 2016
a(n) = abs(((n+3) mod 6)-3) + 1. - Daniel Jiménez, Jan 14 2023

Extensions

Additional comments from Robert G. Wilson v, Mar 01 2002

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)

A109527 Prague bus clock sequence.

Original entry on oeis.org

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

Views

Author

Eric Angelini and others, Aug 29 2005

Keywords

Comments

See the sequence as a succession of quadruplets showing the time (in hours and minutes). The sequence starts at midnight (00:00) and ends at 22:51 showing all sound times seen in a lateral mirror (if the clock in the bus indicates 22:51 one will read 15:22 in a lateral window, which is a possible time of the day, thus the quadruplet 2251 belongs to the sequence; the quadruplet 0825 is not in the sequence as 08:25 produces 25:80 in the window). On such a digital clock the only digits which produce another "mirror" digit are 0 (->0), 1 (->1), 2 (->5), 5(->2) and 8(->8). "8" must be discarded in this sequence and "5" carefully used.

Crossrefs

A109571 Prague bus clock sequence #2.

Original entry on oeis.org

1, 1, 8, 1, 1, 8, 1, 1, 28, 1, 9, 1, 1, 8, 1, 1, 8, 1, 1, 28, 1, 9, 1, 1, 8, 1, 1, 8, 1, 1, 28, 1, 129, 1, 1, 8, 1, 1, 8, 1, 1, 28, 1, 249, 1, 1, 8, 1, 1, 8, 1, 1, 28, 1, 9, 1, 1, 8, 1, 1, 8, 1, 1, 28, 1, 9, 1, 1, 8, 1, 8, 1, 1, 28, 1, 129, 1, 1, 8, 1, 1, 8, 1, 1, 28, 1, 249, 1, 1, 8, 1, 1, 8, 1, 1, 28, 1, 9
Offset: 1

Views

Author

Eric Angelini and others, Aug 30 2005

Keywords

Comments

Start a digital clock at midnight; you read 00:00 (hours and minutes). Wait for 1 minute and read 00:01; if you look at 00:01 in a mirror, you'll see 10:00, which is a sound time on such a clock; wait for another minute and read 00:02; this gives the "mirror time" 20:00, which is sound; you must wait now for 8 minutes before seeing another sound "mirror time": 00:10 gives 01:00; etc. Successive waiting times form the sequence. The "mirror digit transform" is: 0->0, 1->1, 2->5, 5->2 and 8->8. "8" can't be used here and "5" must be carefully placed.

Examples

			Successive number of minutes one has to wait, starting at midnight, to read a sound "mirror" time on a digital clock.
		

Crossrefs

A175244 For k>=1 let k = a(i)^2 +...+ a(i+r-1)^2, r is the least number of squares that add up to k (A002828); a(i)<=a(i+1)<=..<=a(i+r-1); i>=1.

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Mar 13 2010

Keywords

Examples

			1=1^2 so a(1)=1, 2=1^2+1^2 so a(2)=1 and a(3)=1, 3=1^2+1^2+1^2 so a(4)=1 and a(5)=1 and a(6)=1, 4=2^2 so a(7)=2, 5=1^2+2^2 so a(8)=1 and a(9)=2, 6=1^2+1^2+2^2 so a(10)=1 and a(11)=1 and a(12)=2, 7=1^2+1^2+1^2+2^2 so a(13)=1 and a(14)=1 and a(15)=1 and a(16)=2, 8=2^2+2^2 so a(17)=2 and a(18)=2, 9=3^2 so a(19)=3, etc...
		

Crossrefs

Showing 1-5 of 5 results.