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

A194200 [sum{(k*e) : 1<=k<=n}], where [ ]=floor, ( )=fractional part.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Aug 19 2011

Keywords

Comments

The defining [sum] is equivalent to
...
a(n)=[n(n+1)r/2]-sum{[k*r] : 1<=k<=n},
...
where []=floor and r=sqrt(2). Let s(n) denote the n-th partial sum of the sequence a; then the difference sequence d defined by d(n)=s(n+1)-s(n) gives the runlengths of a.
...
Examples:
...
r...........a........s....
1/2......A002265...A001972
1/3......A002264...A001840
2/3......A002264...A001840
1/4......A194220...A194221
1/5......A194222...A118015
2/5......A057354...A011858
3/5......A194222...A118015
4/5......A057354...A011858
1/6......A194223...A194224
3/7......A057357...A194229
1/8......A194235...A194236
3/8......A194237...A194238
sqrt(2)..A194161...A194162
sqrt(3)..A194163...A194164
sqrt(5)..A194169...A194170
sqrt(6)..A194173...A194174
tau......A194165...A194166; tau=(1+sqrt(5))/2
e........A194200...A194201
2e.......A194202...A194203
e/2......A194204...A194205
pi.......A194206...A194207

Examples

			a(5)=[(e)+(2e)+(3e)+4(e)+5(e)]
    =[.718+.436+.154+.873+.591]
    =[2.77423]=2.
		

Crossrefs

Cf. A194201.

Programs

  • Mathematica
    r = E;
    a[n_] := Floor[Sum[FractionalPart[k*r], {k, 1, n}]]
    Table[a[n], {n, 1, 90}]  (* A194200 *)
    s[n_] := Sum[a[k], {k, 1, n}]
    Table[s[n], {n, 1, 100}] (* A194201 *)

A301426 Number of steps required in the worst case for three knights to find the princess in a castle with n rooms arranged in a line (Castle and princess puzzle).

Original entry on oeis.org

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

Views

Author

Dmitry Kamenetsky, Mar 21 2018

Keywords

Comments

The main entry for this problem is A300576. In this version there are three knights who are searching for the princess; each knight can search a different room.

Crossrefs

Formula

It seems that for n >= 3:
if n = 3 mod 5, then a(n) = (n - 3)/5*2 + 1,
otherwise a(n) = floor((n - 4)/5)*2 + 2.
This conjecture is a(n) = A194222(n) for n>2. - R. J. Mathar, Mar 27 2025
Showing 1-2 of 2 results.