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

A356988 a(n) = n - a^[2](n - a^[3](n-1)) with a(1) = 1, where a^[2](n) = a(a(n)) and a^[3](n) = a(a(a(n))).

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 8, 8, 9, 10, 11, 12, 13, 13, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 55, 55, 55, 55, 55
Offset: 1

Views

Author

Peter Bala, Sep 08 2022

Keywords

Comments

This is the second sequence in a family of nested-recurrent sequences with apparently similar structure defined as follows. Given a sequence s = {s(n) : n >= 1} we define the k-th iterated sequence s^[k] by putting s^[1](n) = s(n) and setting s^[k](n) = s^[k-1](s(n)) for k >= 2. For k >= 1, we define a nested-recurrent sequence, dependent on k, by putting u(1) = 1 and setting u(n) = n - u^[k](n - u^[k+1](n-1)) for n >= 2. This is the case k = 2. For other cases see A006165 (k = 1), A356989 (k = 3) and A356990 (k = 4).
The sequence is slow, that is, for n >= 1, a(n+1) - a(n) is either 0 or 1. The sequence is unbounded.
The line graph of the sequence {a(n)} thus consists of a series of plateaus (where the value of the ordinate a(n) remains constant as n increases) joined by lines of slope 1.
The sequence of plateau heights begins 3, 5, 8, 13, 21, 34, 55, ..., the Fibonacci numbers A000045.
The plateaus start at abscissa values n = 4, 7, 11, 18, 29, 47, 76, ..., the Lucas numbers A000032, and finish at abscissa values n = 5, 8, 13, 21, 34, 55, 89, ..., the Fibonacci numbers. The sequence of plateau lengths 1, 1, 2, 3, 5, 8, 13, ... is thus the Fibonacci sequence.
The iterated sequences{a^[k](n) : n >= 1}, k = 2, 3,..., share similar properties to the present sequence. See the Example section below.

Examples

			Related sequences:
1) The square of the sequence: {a^[2](n) : n >= 1} = {a(a(n)) : n >= 1}. The first few terms are
  1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 6, 7, 8, 8, 8, 8, 8, 8, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 36, 37, 38, 39, ...
The sequence is slow. The line graph of the sequence has plateaus of height Fibonacci(k), k >= 2, starting at abscissa value 2*Fibonacci(k) and ending at abscissa Fibonacci(k+2).
2) The cube of the sequence: {a^[3](n) : n >= 1} = {a(a(a(n))) : n >= 1}. The first few terms are
  1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, ...
The line graph of the sequence has plateaus of height Fibonacci(k), k >= 2, starting at abscissa value 3*Fibonacci(k) and ending at abscissa Fibonacci(k+3).
		

Crossrefs

Programs

  • Maple
    a := proc(n) option remember; if n = 1 then 1 else n - a(a(n - a(a(a(n-1))))) end if; end proc:
    seq(a(n), n = 1..100);

Formula

a(n+1) - a(n) = 0 or 1.
The terms of the sequence are completely determined by the following two results:
a) for n >= 2, a(L(n-1) + j) = F(n) for 0 <= j <= F(n-3), where F(n) = A000045(n), the n-th Fibonacci number with F(-1) = 1 and L(n) = A000032(n), the n-th Lucas number;
b) for n >= 2, a(F(n+1) + j) = F(n) + j for 0 <= j <= F(n-1).
Hence a(F(n+2)) = a(F(n+1)) + a(F(n)) for n >= 2 and a(L(n+2)) = a(L(n+1)) + a(L(n)) for n >= 0.
a(2*F(n)) = Lucas(n-1) for n >= 2;
a(3*F(n)) = 2*F(n) for n >= 1;
a(4*F(n)) = F(n+2) for n >= 2;
a(5*F(n)) = 4*F(n) - F(n-1) = A022120(n-2) for n >= 2.
a(2*L(n)) = F(n) + 3*F(n-1) = A104449(n) for n >= 0;
a(3*L(n)) = F(n+3) for n >= 3;
a(4*L(n)) = F(n+4) - L(n-3) = A022114(n-1) for n >= 3;
a(5*L(n)) = 11*F(n-1) + F(n-4) = A022367(n-1) for n >= 4.
For n >= 1, m >= 2, a(F(m*n)) = F(m*n-1) and a(L(m*n)) = F(m*n+1). Hence
a(L(m*n)) + a(F(m*n)) = L(m*n) and a(L(m*n)) - a(F(m*n)) = F(m*n).
Conjectures:
1) a(n) + a^[2](n - a^[2](n - a^[2](n))) = n for n >= 2.
2) If k >= 2 and m = 2*k - 1 then a(m*n - a(k*n)) = a(m*n - a(m*n - a(m*n - a(k*n)))).

A294116 Fibonacci sequence beginning 2, 21.

Original entry on oeis.org

2, 21, 23, 44, 67, 111, 178, 289, 467, 756, 1223, 1979, 3202, 5181, 8383, 13564, 21947, 35511, 57458, 92969, 150427, 243396, 393823, 637219, 1031042, 1668261, 2699303, 4367564, 7066867, 11434431, 18501298, 29935729, 48437027, 78372756, 126809783, 205182539, 331992322, 537174861
Offset: 0

Views

Author

Bruno Berselli, Oct 23 2017

Keywords

References

  • Steven Vajda, Fibonacci and Lucas Numbers, and the Golden Section: Theory and Applications, Dover Publications (2008), page 24 (formula 8).

Crossrefs

Subsequence of A047201, A047592, A113763.
Sequences of the type g(2,k;n): A118658 (k=0), A000032 (k=1), 2*A000045 (k=2,4), A020695 (k=3), A001060 (k=5), A022112 (k=6), A022113 (k=7), A294157 (k=8), A022114 (k=9), A022367 (k=10), A022115 (k=11), A022368 (k=12), A022116 (k=13), A022369 (k=14), A022117 (k=15), A022370 (k=16), A022118 (k=17), A022371 (k=18), A022119 (k=19), A022372 (k=20), this sequence (k=21), A022373 (k=22); A022374 (k=24); A022375 (k=26); A022376 (k=28), A190994 (k=29), A022377 (k=30); A022378 (k=32).

Programs

  • Magma
    a0:=2; a1:=21; [GeneralizedFibonacciNumber(a0, a1, n): n in [0..40]];
    
  • Mathematica
    LinearRecurrence[{1, 1}, {2, 21}, 40]
  • PARI
    Vec((2 + 19*x)/(1 - x - x^2) + O(x^40)) \\ Colin Barker, Oct 25 2017
    
  • Sage
    a = BinaryRecurrenceSequence(1, 1, 2, 21)
    print([a(n) for n in range(38)]) # Peter Luschny, Oct 25 2017

Formula

G.f.: (2 + 19*x)/(1 - x - x^2).
a(n) = a(n-1) + a(n-2).
Let g(r,s;n) be the n-th generalized Fibonacci number with initial values r, s. We have:
a(n) = Lucas(n) + g(0,20;n), see A022354;
a(n) = Fibonacci(n) + g(2,20;n), see A022372;
a(n) = 2*g(1,21;n) - g(0,21;n);
a(n) = g(1,k;n) + g(1,21-k;n) for all k in Z.
a(h+k) = a(h)*Fibonacci(k-1) + a(h+1)*Fibonacci(k) for all h, k in Z (see S. Vajda in References section). For h=0 and k=n:
a(n) = 2*Fibonacci(n-1) + 21*Fibonacci(n).
Sum_{j=0..n} a(j) = a(n+2) - 21.
a(n) = (2^(-n)*((1-sqrt(5))^n*(-20+sqrt(5)) + (1+sqrt(5))^n*(20+sqrt(5)))) / sqrt(5). - Colin Barker, Oct 25 2017

A022323 a(n) = a(n-1) + a(n-2) + 1, with a(0) = 1 and a(1) = 9.

Original entry on oeis.org

1, 9, 11, 21, 33, 55, 89, 145, 235, 381, 617, 999, 1617, 2617, 4235, 6853, 11089, 17943, 29033, 46977, 76011, 122989, 199001, 321991, 520993, 842985, 1363979, 2206965, 3570945, 5777911, 9348857
Offset: 0

Views

Author

Keywords

Programs

  • Mathematica
    LinearRecurrence[{2,0,-1}, {1,9,11}, 50] (* G. C. Greubel, Aug 25 2017 *)
  • PARI
    x='x+O('x^50); Vec((1+7*x-7*x^2)/((1-x)*(1-x-x^2))) \\ G. C. Greubel, Aug 25 2017

Formula

From R. J. Mathar, Apr 07 2011: (Start)
G.f.: (1+7*x-7*x^2)/((1-x)*(1-x-x^2)).
a(n) = A022367(n) - 1. (End)
a(n) = 2*F(n+2) + 6*F(n) - 1, where F = A000045. - G. C. Greubel, Aug 25 2017
Showing 1-3 of 3 results.