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.

A079051 Recamán variation: a(0) = 0; for n >= 1, a(n) = a(n-1) - f(n) if that number is positive and not already in the sequence, otherwise a(n) = a(n-1) + f(n), where f(n) = floor(sqrt(n)) (A000196).

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 9, 11, 13, 10, 13, 16, 19, 22, 25, 28, 24, 20, 24, 28, 32, 36, 40, 44, 48, 43, 38, 33, 38, 43, 48, 53, 58, 63, 68, 73, 67, 61, 55, 49, 55, 61, 67, 73, 79, 85, 91, 97, 103, 96, 89, 82, 75, 82, 89, 96, 103, 110, 117, 124, 131, 138, 145, 152, 144, 136, 128, 120
Offset: 0

Views

Author

Benoit Cloitre, Feb 02 2003

Keywords

References

  • N. J. A. Sloane and Allan Wilks, On sequences of Recaman type, paper in preparation, 2006.

Crossrefs

Cf. A000196, A005132. Numbers missed are in A117247.

Programs

  • Mathematica
    Fold[Append[#1, If[MemberQ[#1, (a = #1[[-1]]) - (r = Floor@Sqrt@#2)], a + r, a - r]] &, {0, 1}, Range[2, 70]] (* Ivan Neretin, Apr 22 2018 *)
  • PARI
    lista(nn) = {va = vector(nn+1); last = 0; for (n=1, nn, new = last - sqrtint(n); if ((new <= 0) || vecsearch(vecsort(va,,8), new), new = last + sqrtint(n)); va[n+1] = new; last = new;); va;} \\ Michel Marcus, Apr 23 2018

Formula

Conjecture: for n>100, 1/2 < a(n)/(n*log(n)) < 1.
The conjecture is false. In fact, a(n) = n^(3/2)/6 + O(n). - N. J. A. Sloane, Apr 29 2006

A352745 a(n) is the number of Lyndon factors of the Fibonacci string of length n.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 6, 5, 8, 6, 10, 7, 12, 8, 14, 9, 16, 10, 18, 11, 20, 12, 22, 13, 24, 14, 26, 15, 28, 16, 30, 17, 32, 18, 34, 19, 36, 20, 38, 21, 40, 22, 42, 23, 44
Offset: 0

Views

Author

Peter Luschny, Apr 06 2022

Keywords

Comments

The Fibonacci string of length n is defined Fibonacci(n) = cat(Fibonacci(n - 1), Fibonacci(n - 2)) for 1 < n and the initial conditions Fibonacci(0) = "1" and Fibonacci(1) = "0", where 'cat' is the operation of concatenating strings. The length of Fibonacci(n) is A352744(1, n). The sequence starts: "1", "0", "01", "010", "01001", "01001010", ...
Apart from the first four terms seems to be identical with A117248.

Examples

			The Lyndon factorization of the Fibonacci strings of length n = 0..9.
[0] ["1"]
[1] ["0"]
[2] ["01"]
[3] ["01", "0"]
[4] ["01", "001"]
[5] ["01", "00101", "0"]
[6] ["01", "00101", "001", "001"]
[7] ["01", "00101", "0010010100101", "0"]
[8] ["01", "00101", "0010010100101", "00100101", "001", "001"]
[9] ["01", "00101", "0010010100101", "0010010100100101001010010010100101", "0"]
		

Crossrefs

Programs

  • Maple
    with(StringTools): A352745 := n -> nops(LyndonFactors(Fibonacci(n))):
    seq(A352745(n), n = 0..12);
Showing 1-2 of 2 results.