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.

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)

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 *)

A118383 Unrefined Orloj clock sequences; row n sums to n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

An Orloj clock sequence is a finite sequence of positive integers that, when iterated, can be grouped so that the groups sum to successive natural numbers. There is one unrefined sequence whose values sum to each n; all other Orloj clock sequences summing to n can be obtained by refining this one. Refining means splitting one or more terms into values summing to that term. (The unrefined sequence for n = 2^k*(2m-1) is the sequence for 2m-1 repeated 2^k times, but any single refinement - possible unless m = 1 - will produce an aperiodic sequence summing to n.) The Orloj clock sequence is the one summing to 15: 1,2,3,4,3,2, with a beautiful up and down pattern.

Examples

			For a sum of 5, we have 1,2,2, which groups as 1, 2, 2+1, 2+2, 1+2+2, 1+2+2+1, .... This could be refined by splitting the second 2, to give the sequence 1,2,1,1; note that when this is grouped, the two 1's from the refinement always wind up in the same sum.
The array starts:
1;
1, 1;
1, 2;
1, 1, 1, 1;
1, 2, 2;
1, 2, 1, 2;
1, 2, 3, 1.
		

Crossrefs

Length of row n is A117484(n).

Programs

  • PARI
    {Orloj(n) = my(found,tri,i,last,r); found = vector(n,i,0); found[n] = 1; tri = 0; for(i = 1, if(n%2==0,n-1,n\2), tri += i; if(tri > n, tri -= n); found[tri] = 1); last = 0; r = []; for(i = 1, n, if(found[i], r = concat(r, [i-last]); last = i)); r}
    for (n=1,10,print(Orloj(n)))

Formula

Let b(i),0<=i

A117704 Least refined sequence that can be grouped to sum to either natural numbers or odd numbers.

Original entry on oeis.org

1, 2, 1, 2, 3, 1, 5, 1, 5, 4, 3, 8, 9, 4, 6, 9, 2, 12, 3, 10, 9, 5, 15, 1, 15, 8, 9, 16, 2, 19, 6, 14, 15, 6, 22, 3, 20, 13, 11, 24, 1, 26, 10, 17, 22, 6, 29, 6, 24, 19, 12, 32, 1, 32, 15, 19, 30, 5, 36, 10, 27, 26, 12, 39, 4, 36, 21, 20, 39, 3, 43, 15, 29, 34, 11, 46, 8, 39, 28, 20, 49, 50
Offset: 1

Author

Keywords

Comments

In other words, least common refinement of the natural numbers and the odd numbers.

Examples

			As natural numbers: 1,2,1+2,3+1,5,1+5,4+3,8,...
As odd numbers: 1,2+1,2+3,1+5+1,5+4,3+8,...
		

Crossrefs

Programs

  • Haskell
    a117704 n = a117704_list !! (n-1)
    a117704_list = 1 : zipWith (-) (tail a005214_list) a005214_list
    -- Reinhard Zumkeller, Aug 03 2011

Formula

a(n) = A005214(n) - A005214(n-1).

A117510 Index (sum) of first Orloj clock sequence containing n.

Original entry on oeis.org

1, 3, 7, 11, 19, 21, 35, 63, 45, 95, 99, 93, 119, 105, 165, 429, 273, 285, 581, 385, 345, 495, 749, 651, 665, 1001, 693, 1155, 1197, 1155, 1287, 1463, 693, 1935, 1659, 2331, 2145, 1995, 2915, 2415, 3399, 2115, 4785, 3157, 3519, 5225, 5481, 2871, 5115, 6045
Offset: 1

Author

Keywords

Comments

a(n) >= n(n+1)/2. This is equality for n = 1,2,6,9,14. Are there any others?

Crossrefs

Cf. A118382.

A120449 Array by antidiagonals of all primitive Orloj clock striking sequences.

Original entry on oeis.org

1, 11, 1, 111, 2, 1, 1111, 12, 2, 1, 11111, 121, 21, 2, 1, 111111, 212, 22, 3, 2, 1, 1111111, 1212, 122, 112, 3, 2, 1, 11111111, 12121, 1221, 311, 31, 12, 11, 1, 111111111, 21212, 2212, 231, 23, 4, 3, 2, 1, 1111111111, 121212, 21221, 1231, 312
Offset: 1

Author

Keywords

Comments

This is the sequences of strikes at each hour, represented by concatenation of the digits. The repeating pattern for each row is in A118382. This table eventually contains non-decimal digits. Row 47 is the first one containing a non-decimal digit.

Examples

			The table starts:
1 11 111 1111 11111 111111 ...
1 2 12 121 212 1212 ...
1 2 21 22 122 1221 ...
1 2 3 112 311 231 ...
1 2 3 31 23 312 ...
		

Crossrefs

Showing 1-7 of 7 results.