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 10 results.

A064289 Height of n-th term in Recamán's sequence A005132.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 25 2001

Keywords

Comments

The height of a term in A005132 = number of addition steps - number of subtraction steps to produce it.
Partial sums of A160357. - Allan C. Wechsler, Sep 08 2019

Examples

			A005132 begins 1, 3, 6, 2, 7, 13, 20, 12, ... and these terms have heights 1, 2, 3, 2, 3, 4, 5, 4, ...
		

Crossrefs

Programs

  • Maple
    g:= proc(n) is(n=0) end:
    b:= proc(n) option remember; local t;
          if n=0 then 0 else t:= b(n-1)-n; if t<=0 or g(t)
          then t:= b(n-1)+n fi; g(t):= true; t fi
        end:
    a:= proc(n) option remember; `if`(n=0, 0,
           a(n-1)+signum(b(n)-b(n-1)))
        end:
    seq(a(n), n=0..120);  # Alois P. Heinz, Sep 08 2019
  • Mathematica
    g[n_] := n == 0;
    b[n_] := b[n] = Module[{t}, If[n == 0, 0, t = b[n - 1] - n; If[t <= 0 || g[t], t = b[n - 1] + n]; g[t] = True; t]];
    a[n_] := a[n] = If[n == 0, 0, a[n - 1] + Sign[b[n] - b[n - 1]]];
    a /@ Range[0, 100] (* Jean-François Alcover, Apr 11 2020, after Alois P. Heinz *)

Extensions

a(0)=0 prepended by Allan C. Wechsler, Sep 08 2019

A064290 First number of height n in Recamán's sequence A005132.

Original entry on oeis.org

0, 1, 3, 6, 13, 20, 43, 62, 113, 224, 367, 494, 833, 1815, 3379, 5551, 9169, 17864, 32978, 58964, 106218, 131313, 155719, 180118, 591890, 881467, 1345004, 3012446, 5728819, 9309579, 17512700, 25641318, 52978675, 61998980, 125130665, 244636214, 280766754, 566273517, 1031389697, 2182394227, 3045423658, 3454917187
Offset: 1

Views

Author

N. J. A. Sloane, Sep 25 2001

Keywords

Comments

The height of a term in A005132 = number of addition steps - number of subtraction steps to reach it (see A064289).
Needs a b-file. - N. J. A. Sloane, May 01 2020

Examples

			A005132 begins 0, 1, 3, 6, 2, 7, 13, 20, 12, ... and these terms have heights 0, 1, 2, 3, 2, 3, 4, 5, 4, ...
		

Crossrefs

Extensions

a(0) = 0 added by N. J. A. Sloane, May 01 2020

A064288 Height of n when it appears for first time in Recamán's sequence A005132.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 25 2001

Keywords

Comments

The height of a term in A005132 = number of addition steps - number of subtraction steps to produce it (see A064289).

Examples

			A005132 begins 0, 1, 3, 6, 2, 7, 13, 20, 12, ... and these terms have heights 0, 1, 2, 3, 2, 3, 4, 5, 4, ...
		

Crossrefs

Programs

  • C
    See Links section.

Extensions

a(0)=0 added by N. J. A. Sloane, May 01 2020

A064292 Term at which first number of height n occurs in Recamán's sequence A005132.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 18, 19, 34, 67, 102, 115, 190, 453, 846, 1305, 2066, 4139, 7676, 13511, 23976, 24381, 24398, 24399, 97984, 136629, 196644, 475235, 926170, 1466185, 2817020, 3850823, 8348662, 8466695, 17694894, 36130539, 36130540, 75209333, 138765002, 315446985, 409493528, 409493529
Offset: 0

Views

Author

N. J. A. Sloane, Sep 26 2001

Keywords

Comments

The height of a term in A005132 = number of addition steps - number of subtraction steps to produce it.

Crossrefs

Extensions

a(0)=0 added by N. J. A. Sloane, May 01 2020

A064294 Term at which last number of height n occurs in Recamán's sequence A005132.

Original entry on oeis.org

1, 4, 5, 16, 31, 64, 131, 222, 403, 770, 1409, 2652, 4825, 9078, 16773, 30768, 56827, 99734, 181653, 328002, 588583, 1032996, 1787013, 3220128, 5771203, 10201340, 18394609, 32144188, 58055311, 101762018, 173367175, 302844912, 511518279, 904032692
Offset: 1

Views

Author

N. J. A. Sloane, Sep 26 2001

Keywords

Comments

The height of a term in A005132 = number of addition steps - number of subtraction steps to produce it.

Crossrefs

Cf. A005132, A064290, A064292, A064293. This sequence and A064492 keep pretty close together.

A064291 Record high values in Recamán's sequence A005132.

Original entry on oeis.org

0, 1, 3, 6, 7, 13, 20, 21, 22, 23, 24, 25, 43, 62, 63, 79, 113, 114, 157, 224, 225, 226, 227, 228, 265, 367, 368, 369, 370, 379, 494, 495, 631, 632, 633, 634, 635, 636, 643, 833, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1182, 1183
Offset: 0

Views

Author

N. J. A. Sloane, Sep 25 2001

Keywords

Crossrefs

Extensions

a(0)=0 added by N. J. A. Sloane, May 01 2020

A064492 Start of n-th segment of Recamán's sequence R(m) (A005132): values of n where the change in the fractional parts of successive values of R(n)/n is positive.

Original entry on oeis.org

1, 2, 4, 7, 12, 22, 40, 77, 135, 249, 454, 845, 1521, 2753, 5046, 9318, 17224, 31222, 57072, 99742, 181694, 328256, 589933, 1034839, 1788538, 3225919, 5784586, 10212211, 18399785, 32148795, 58056876, 101769230, 173395920, 302890749, 511561221, 904036925, 1610187039, 2789150424, 4910758398, 8416580355, 13808215356, 23006557539, 39488697701, 65854567303, 107078836274, 188471115227, 325374626149, 535755688022, 872467803894, 1404720439054, 2402964238974, 3883018238330, 6283167591180, 10125357598983, 16166305650061, 25735985498862, 40806937801473, 64628644387495, 102481019573338, 159888464280047, 250759470174414, 394178473635589, 599819882554936, 939455761022725
Offset: 1

Views

Author

John W. Layman, Oct 04 2001

Keywords

Crossrefs

Cf. A005132, A064288, A064289, A064292, A064293. This sequence and A064294 keep pretty close together.
See A065038 for the corresponding values of R(n). See also A065053 for first differences.

Extensions

More terms from John W. Layman and N. J. A. Sloane, Oct 12 2001
Extended to 10^15 by Allan Wilks, Nov 06 2001

A269830 Number of terms of height n in Recamán's sequence A005132.

Original entry on oeis.org

1, 2, 2, 6, 11, 22, 34, 61, 115, 220, 397, 681, 1329, 2430, 4561, 8116, 14848, 24878
Offset: 1

Views

Author

Danny Rorabaugh, Mar 05 2016

Keywords

Comments

The height (A064289) of a term in Recamán's sequence (A005132) = number of addition steps - number of subtraction steps to produce it.

Crossrefs

A269831 Least term of height n in Recamán's sequence A005132.

Original entry on oeis.org

1, 2, 6, 8, 14, 26, 4, 47, 92, 111, 181, 150, 371, 361, 781, 828, 366, 19
Offset: 1

Views

Author

Danny Rorabaugh, Mar 05 2016

Keywords

Comments

The height (A064289) of a term in Recamán's sequence (A005132) = number of addition steps - number of subtraction steps to produce it.

Crossrefs

A269832 Greatest term of height n in Recamán's sequence A005132.

Original entry on oeis.org

1, 3, 7, 13, 25, 46, 91, 164, 286, 515, 962, 1744, 3137, 5810, 10319, 18953, 35079, 63237
Offset: 1

Views

Author

Danny Rorabaugh, Mar 05 2016

Keywords

Comments

The height (A064289) of a term in Recamán's sequence (A005132) = number of addition steps - number of subtraction steps to produce it.

Crossrefs

Showing 1-10 of 10 results.