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.

Previous Showing 11-20 of 76 results. Next

A167616 a(n) = Fibonacci(n) - 5.

Original entry on oeis.org

0, 3, 8, 16, 29, 50, 84, 139, 228, 372, 605, 982, 1592, 2579, 4176, 6760, 10941, 17706, 28652, 46363, 75020, 121388, 196413, 317806, 514224, 832035, 1346264, 2178304, 3524573, 5702882, 9227460, 14930347, 24157812, 39088164, 63245981, 102334150
Offset: 5

Views

Author

N. J. A. Sloane, Jun 26 2010

Keywords

Crossrefs

Programs

Formula

a(n) = a(n-1) + a(n-2) + 5. - Zak Seidov, Jun 27 2010
a(5)=0, a(6)=3, a(7)=8, a(n) = 2*a(n-1) - a(n-3). - Harvey P. Dale, Dec 31 2011
G.f.: x^6*(3+2*x)/((1-x)*(1-x-x^2)). - L. Edson Jeffery, Mar 17 2013

A171587 Sequence of the diagonal variant of the Fibonacci word fractal. Sequence of the Fibonacci tile.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0
Offset: 0

Views

Author

Keywords

Comments

This is the upper Wythoff sequence (A001950) read mod 2 (for proof see formula section). So a(n) = floor((n+1)*phi^2) mod 2 where phi = (1+sqrt(5))/2. - Michel Dekking, Feb 01 2021
Interpreted as 0=turn right and 1=turn left, this sequence builds the diagonal variant of the Fibonacci word fractal. Base for the construction of the Fibonacci tile (Tiles the plane by translation in 2 ways).
From Michel Dekking, May 03 2018: (Start)
This is a morphic sequence, i.e., the letter to letter projection of a fixed point of a morphism. To see this, one uses the formula which generates (a(n)) from the Dense Fibonacci word A143667. Note that in the Dense Fibonacci word, which is the fixed point of the morphism
0->10221, 1->1022, 2->1021,
the letter 0 exclusively occurs preceded directly by the letter 1. This enables one to create a new letter 3, encoding the word 10, and a morphism
1->322, 2->321, 3->3223221,
which has the property that the letter to letter projection
1->0, 2->1, 3->0
of its fixed point 3,2,2,3,2,2,1,3,2,1,... is equal to (a(n)).
(End)
Also Hofstadter G-sequence (A005206) mod 2. Another morphism can be written in octonary notation as: 0->4, 1->7, 2->5, 3->6, 4->60, 5->53, 6->71, 7->42, where the high bit gives A005614 and the low bit (i.e. "mod 2") gives this A171587 for n>0. The "Missing Words Proof Certificate" found under Links uses this representation to compute missing words of length L = 3, 4, 6, 9, 14, 22. Is there another missing word of length L = 35 as A001611 suggests? - Bradley Klee, Dec 24 2024

Examples

			q[2] = q[1]q[0] = 0,        q[3] = q[2]bar{q[1]} = 01,
q[4] = q[3]bar{q[2]} = 011, q[5] = q[4]q[3] = 01101.
		

Crossrefs

Cf. A001950 (upper Wythoff sequence), A085002 (lower Wythoff sequence mod 2).

Programs

  • Go
    func b(n int) []int {
        a := make([]int, n+1);
        for i:=1; i < n+1; i++ {
            a[i] = i-a[a[i-1]];
        };
        for i:=0; i < n+1; i++ {
            a[i] %= 2;
        };
        return a
    } // Bradley Klee, Dec 25 2024
  • Mathematica
    (* This program supports the conjecture that A171587=(A001950 mod 2). *)
    t = Nest[Flatten[# /. {1 -> {1, 0, 2, 2}, 0 -> {1, 0, 2, 2, 1}, 2 -> {1, 0, 2, 1}}] &, {1}, 5]
    w = DeleteCases[t, 0] /. {1 -> 0, 2 -> 1}
    u = Table[n + Floor[n*GoldenRatio], {n, 1, 500}]; v = Mod[u, 2]
    Table[w[[n]] - v[[n]], {n, 1, 500}] (* supports conjecture for n=1,2,...,500 *)
    (* t=A143667, w=A171587, u=A001950, conjecture: v=w *)

Formula

This sequence is defined by Blondin-Massé et al. as a limit of recursively defined words q[n]. Here q[0] is the empty word, and q[1]=0.
The recursion is given by
q[n]=q[n-1]q[n-2] if n=2 mod 3, and
q[n]=q[n-1]bar{q[n-2]} if n=0 or 1 mod 3,
where bar exchanges 0 and 1.
Also application of the mapping 1->0, 2->1, 0->empty word to the Dense Fibonacci word A143667.
Conjecture: A171587=(A001950 mod 2), as suggested for n=1,2,...,500 by Mathematica program below. - Clark Kimberling, May 31 2011
From Michel Dekking, May 03 2018: (Start)
Proof of Kimberling's 2011 conjecture, i.e., this sequence is the parity sequence of the Upper Wythoff sequence A001950.
The first difference sequence 3, 2, 3, 3, 2, 3, 2, 3, ... of the Upper Wythoff sequence is equal to the unique fixed point of the morphism
beta: 2 -> 3, 3 -> 32 (cf. A282162).
We define the first difference operator D on finite words w by
D(w(1)...w(m)) = (w(2)-w(1))...(w(m)-w(m-1)).
Note that the length of D(w) is one less than the length of w, and note
LEMMA 1: D(vw) = D(v)|w(1)-v(l)|D(w), if v = v(1)...v(l), and w = w(1)...w(m). Here |w(1)-v(l)| is modulo 2.
We also need (easily proved by induction)
LEMMA 2: The last letter of the word q[n] equals 0 if and only if n = 0,1,2 modulo 6.
Almost trivial is
LEMMA 3: The last letter e(n) of beta^n(2) equals 2 if and only if n = 0 modulo 2.
The following proposition implies the conjecture.
PROPOSITION: The difference sequence of q[n] satisfies D(q[n]) = beta^{n-1}(2) e(n-1)^{-1} modulo 2 for n>3.
Note that, by definition, beta^n(2) e(n)^{-1} is just the word beta^n(2), with the last letter removed.
PROOF: By induction. Combine Lemma 1, 2 and 3 in the recursion for the q[n], for n = 0,...,5 modulo 6, using the following table:
n modulo 6 | 0 | 1 | 2 | 3 | 4 | 5 |
last letter of q[n-1] | 1 | 0 | 0 | 0 | 1 | 1 |
first letter of q[n-2]* | 1 | 1 | 0 | 1 | 1 | 0 |
Here q[n-2]* denotes either q[n-2] (if n == 2 (mod 3)), or bar{q[n-2]} (if n == 0,1 (mod 3)).
For example, where all equalities are modulo 2,
D(q[8]) = D(q[7]) 0 D(q[6]) = beta^6(2) f(6) 0 beta^5(2) f(5) = beta^6(2) beta^5(2) f(5) = beta^5(32) f(5) = beta^7(2) f(7),
where f(n):=(e(n) mod 2)^{-1}.
(End)

Extensions

Formula corrected and extended by Michel Dekking, May 03 2018

A002062 a(n) = Fibonacci(n) + n.

Original entry on oeis.org

0, 2, 3, 5, 7, 10, 14, 20, 29, 43, 65, 100, 156, 246, 391, 625, 1003, 1614, 2602, 4200, 6785, 10967, 17733, 28680, 46392, 75050, 121419, 196445, 317839, 514258, 832070, 1346300, 2178341, 3524611, 5702921, 9227500, 14930388, 24157854, 39088207, 63246025
Offset: 0

Views

Author

Keywords

Comments

Let A006355(n+4)_0%20-%20A066982(n+1)_1%20(conjecture);%20(a(n))%20=%20em%5BK*%20%5Dseq(%20.25'i%20-%20.25'j%20-%20.25'k%20-%20.25i'%20+%20.25j'%20-%20.75k'%20-%20.25'ii'%20-%20.25'jj'%20-%20.25'kk'%20-%20.25'ij'%20-%20.25'ik'%20-%20.75'ji'%20+%20.25'jk'%20-%20.25'ki'%20-%20.75'kj'%20+%20.75e),%20apart%20from%20initial%20term.%20-%20_Creighton%20Dement">x indicate the sequence offset. Then a(n+2)_0 = A006355(n+4)_0 - A066982(n+1)_1 (conjecture); (a(n)) = em[K* ]seq( .25'i - .25'j - .25'k - .25i' + .25j' - .75k' - .25'ii' - .25'jj' - .25'kk' - .25'ij' - .25'ik' - .75'ji' + .25'jk' - .25'ki' - .75'kj' + .75e), apart from initial term. - _Creighton Dement, Nov 19 2004

References

  • R. Honsberger, Ingenuity in Math., Random House, 1970, p. 96.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    List([0..50], n-> Fibonacci(n)+n); # G. C. Greubel, Jul 09 2019
  • Haskell
    a002062 n = a000045 n + toInteger n
    a002062_list = 0 : 2 : 3 : (map (subtract 1) $
       zipWith (-) (map (* 2) $ drop 2 a002062_list) a002062_list)
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Magma
    [Fibonacci(n)+n: n in [0..50]]; // G. C. Greubel, Jul 09 2019
    
  • Maple
    a:= n-> combinat[fibonacci](n)+n: seq(a(n), n=0..50); # Zerinvary Lajos, Mar 20 2008
  • Mathematica
    Table[Fibonacci[n]+n,{n,0,50}] (* Harvey P. Dale, Jul 27 2011 *)
  • MuPAD
    numlib::fibonacci(n)+n $ n = 0..50; // Zerinvary Lajos, May 08 2008
    
  • PARI
    a(n)=fibonacci(n) + n \\ Charles R Greathouse IV, Oct 03 2016
    
  • Sage
    [fibonacci(n)+n for n in (0..50)] # G. C. Greubel, Jul 09 2019
    

Formula

G.f.: x*(-2+3*x) / ( (x^2+x-1)*(x-1)^2 ). - Simon Plouffe in his 1992 dissertation
From Wolfdieter Lang: (Start)
Convolution of natural numbers n >= 1 with Fibonacci numbers F(k), k >= -3, (F(-k)=(-1)^(k+1)*F(k));
G.f.: x*(2-3*x)/((1-x-x^2)*(1-x)^2). (End)
a(n) = 2*a(n-1) - a(n-3) - 1. - Kieren MacMillan, Nov 08 2008
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4). - Emmanuel Vantieghem, May 19 2016
E.g.f.: 2*exp(x/2)*sinh(sqrt(5)*x/2)/sqrt(5) + x*exp(x). - Ilya Gutkovskiy, Apr 11 2017

A060112 Sums of nonconsecutive factorial numbers.

Original entry on oeis.org

0, 1, 2, 6, 7, 24, 25, 26, 120, 121, 122, 126, 127, 720, 721, 722, 726, 727, 744, 745, 746, 5040, 5041, 5042, 5046, 5047, 5064, 5065, 5066, 5160, 5161, 5162, 5166, 5167, 40320, 40321, 40322, 40326, 40327, 40344, 40345, 40346, 40440, 40441, 40442
Offset: 1

Views

Author

Antti Karttunen, Mar 01 2001

Keywords

Comments

Zeckendorf (Fibonacci) expansion of n (A003714) reinterpreted as a factorial expansion.
Also positions in A055089, A060117 and A060118 of the permutations that are composed of disjoint adjacent transpositions only. (That these positions are same can be seen by comparing algorithms PermRevLexUnrankAMSD, PermUnrank3R, PermUnrank3L in the respective sequences). Thus also positions of the fixed terms in A065181-A065184. See comment at A065163.
Written as disjoint cycles the permutations are: (), (1 2), (2 3), (3 4), (1 2)(3 4), (4 5), (1 2)(4 5), (2 3)(4 5), etc. Apart from the first one (the identity), these are the only kind of permutations used in campanology when moving from one "change" to next.

Examples

			Zeckendorf Expansions of first few natural numbers and the corresponding values when interpreted as factorial expansions: 0 = 0 = 0, 1 = 1 = 1, 2 = 10 = 2, 3 = 100 = 6, 4 = 101 = 7, 5 = 1000 = 24, 6 = 1001 = 25, 7 = 1010 = 26, 8 = 10000 = 120, etc.,
		

Crossrefs

Subset of A059590. Cf. also A001611, A064640.
For PermRevLexRank, see A056019, for fibbinary see A048679 and A003714.

Programs

  • Maple
    CampanoPerm := proc(n) local z,p,i; p := []; z := fibbinary(n); i := 1; while(z > 0) do if(1 = (z mod 2)) then p := permul(p,[[i,i+1]]); fi; i := i+1; z := floor(z/2); od; RETURN(convert(p,'permlist',i)); end;
  • Mathematica
    With[{b = MixedRadix[Range[12, 2, -1]]}, FromDigits[#, b] & /@ Select[Tuples[{0, 1}, 8], SequenceCount[#, {1, 1}] == 0 &]] (* Michael De Vlieger, Jun 26 2017 *)
  • PARI
    fill(lim,k,val)=if(k>#f, return); my(t=val+f[k]); if(t<=lim, listput(v,t); fill(lim,k+2,t)); fill(lim,k+1,val)
    list(lim)=my(k,t=1); local(f=List(),v=List([0])); while((t*=k++)<=lim, listput(f,t)); f=Vecrev(f); fill(lim,1,0); Set(v) \\ Charles R Greathouse IV, Jun 25 2017
    
  • PARI
    first(n) = my(res = [0, 1], k = 1, t = 1, p = 1); while(#res < n, k++; t++; p *= t; res = concat(res, vector(fibonacci(k), i, res[i]+p))); vector(n, i, res[i]) \\ David A. Corneth, Jun 26 2017

Formula

a(n) = PermRevLexRank(CampanoPerm(n))
a(A001611(n)) = (n-1)! for n > 2. - David A. Corneth, Jun 25 2017

A157727 a(n) = Fibonacci(n) + 4.

Original entry on oeis.org

4, 5, 5, 6, 7, 9, 12, 17, 25, 38, 59, 93, 148, 237, 381, 614, 991, 1601, 2588, 4185, 6769, 10950, 17715, 28661, 46372, 75029, 121397, 196422, 317815, 514233, 832044, 1346273, 2178313, 3524582, 5702891, 9227469, 14930356, 24157821, 39088173, 63245990, 102334159
Offset: 0

Views

Author

N. J. A. Sloane, Jun 26 2010

Keywords

Crossrefs

Programs

  • Haskell
    a157727 = (+ 4) . a000045
    a157727_list = 4 : 5 : map (subtract 4)
                           (zipWith (+) a157727_list $ tail a157727_list)
    -- Reinhard Zumkeller, Jul 30 2013
  • Magma
    [ Fibonacci(n) + 4: n in [0..40] ]; // Vincenzo Librandi, Apr 24 2011
    
  • Mathematica
    Fibonacci[Range[0,50]]+4 (* Harvey P. Dale, Jun 17 2011 *)
  • PARI
    a(n)=fibonacci(n)+4 \\ Charles R Greathouse IV, Jul 02 2013
    

Formula

a(0) = 4, a(1) = 5, a(n) = a(n - 2) + a(n - 1) - 4. - Reinhard Zumkeller, Jul 30 2013
G.f.: (4 - 3*x - 5*x^2)/((1 - x)*(1 - x - x^2)). - Stefano Spezia, Jul 21 2024

A207442 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 1 and 0 1 0 horizontally and 0 0 1 and 1 0 0 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 9, 14, 81, 108, 81, 14, 21, 196, 323, 333, 196, 22, 31, 441, 1058, 1360, 1144, 484, 35, 46, 961, 3223, 6092, 6525, 4048, 1225, 56, 68, 2116, 9515, 25689, 41092, 32393, 14743, 3136, 90, 100, 4624, 28426, 105690, 243981, 287176
Offset: 1

Views

Author

R. H. Hardin Feb 17 2012

Keywords

Comments

Table starts
..2....4.....6......9.......14........21.........31..........46............68
..4...16....36.....81......196.......441........961........2116..........4624
..6...36...108....323.....1058......3223.......9515.......28426.........84486
..9...81...333...1360.....6092.....25689.....105690......439332.......1821924
.14..196..1144...6525....41092....243981....1414091.....8282682......48412066
.22..484..4048..32393...287176...2405923...19685415...162644898....1341574108
.35.1225.14743.165626..2078416..24609889..284247216..3316383098...38630942068
.56.3136.54250.855471.15205846.254583643.4151434555.68394049216.1125157869978

Examples

			Some solutions for n=4 k=3
..1..1..0....0..0..0....0..1..1....0..1..1....1..0..0....0..1..1....1..1..1
..0..0..0....0..1..1....1..1..1....1..1..0....0..0..0....0..0..0....1..1..1
..1..1..0....0..0..0....0..0..0....0..1..1....1..0..0....0..1..1....0..1..1
..0..0..0....0..1..1....1..1..1....1..1..0....0..0..0....0..1..1....1..1..0
		

Crossrefs

Column 1 is A001611(n+2)
Column 2 is Column 1 squared
Row 1 is A038718(n+2)
Row 2 is A207069

A279709 T(n,k)=Number of nXk 0..1 arrays with no element equal to a strict majority of its horizontal and antidiagonal neighbors and with new values introduced in order 0 sequentially upwards.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 2, 3, 5, 8, 3, 4, 11, 13, 16, 5, 6, 22, 42, 34, 32, 8, 9, 47, 125, 161, 89, 64, 13, 14, 102, 385, 717, 617, 233, 128, 21, 22, 224, 1195, 3245, 4121, 2364, 610, 256, 34, 35, 494, 3751, 14988, 27346, 23690, 9057, 1597, 512, 55, 56, 1089, 11823, 70220
Offset: 1

Views

Author

R. H. Hardin, Dec 17 2016

Keywords

Examples

			Table starts
...1....1......1.......2.........3..........5............8............13
...2....2......3.......4.........6..........9...........14............22
...4....5.....11......22........47........102..........224...........494
...8...13.....42.....125.......385.......1195.........3751.........11823
..16...34....161.....717......3245......14988........70220........329692
..32...89....617....4121.....27346.....187484......1302321.......9047660
..64..233...2364...23690....230128....2342179.....24137862.....248664928
.128..610...9057..136181...1936687...29270275....447547408....6837220721
.256.1597..34699..782826..16300179..365809911...8297886949..187983779265
.512.4181.132938.4500021.137192011.4571688626.153848240903.5168463666199
Some solutions for n=4 k=4
..0..1..0..1. .0..1..0..1. .0..1..0..1. .0..1..0..1. .0..1..0..1
..0..0..1..0. .0..1..1..0. .0..1..0..0. .0..1..0..1. .0..1..1..0
..1..0..1..1. .0..0..1..1. .0..0..1..1. .0..1..0..1. .0..0..0..1
..0..1..0..1. .0..1..0..1. .1..0..0..1. .0..1..0..1. .1..1..0..1
		

Crossrefs

Column 1 is A000079(n-1).
Column 2 is A001519.
Row 1 is A000045(n-1).
Row 2 is A001611.

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1)
k=2: a(n) = 3*a(n-1) -a(n-2)
k=3: a(n) = 5*a(n-1) -5*a(n-2) +2*a(n-3)
k=4: [order 8] for n>9
k=5: [order 12] for n>13
k=6: [order 32] for n>33
k=7: [order 60] for n>62
Empirical for row n:
n=1: a(n) = a(n-1) +a(n-2) for n>3
n=2: a(n) = 2*a(n-1) -a(n-3)
n=3: a(n) = 3*a(n-1) -2*a(n-2) -a(n-3) +4*a(n-4) -a(n-5) -a(n-7) -a(n-8)
n=4: [order 23] for n>25
n=5: [order 56] for n>64

A281715 T(n,k)=Number of nXk 0..1 arrays with no element unequal to a strict majority of its horizontal, diagonal and antidiagonal neighbors and with new values introduced in order 0 sequentially upwards.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 2, 7, 4, 8, 3, 14, 8, 6, 16, 5, 29, 38, 14, 9, 32, 8, 61, 90, 97, 17, 14, 64, 13, 126, 305, 294, 245, 22, 22, 128, 21, 265, 902, 1410, 937, 631, 30, 35, 256, 34, 553, 2710, 5781, 6417, 3166, 1625, 43, 56, 512, 55, 1162, 8376, 23798, 37781, 29849, 10738, 4234
Offset: 1

Views

Author

R. H. Hardin, Jan 28 2017

Keywords

Comments

Table starts
...1..1..1.....2......3........5.........8..........13...........21
...2..3..7....14.....29.......61.......126.........265..........553
...4..4..8....38.....90......305.......902........2710.........8376
...8..6.14....97....294.....1410......5781.......23798.......103034
..16..9.17...245....937.....6417.....37781......214045......1321909
..32.14.22...631...3166....29849....252867.....1987696.....17241122
..64.22.30..1625..10738...142023...1721319....18779855....230037168
.128.35.43..4234..37285...677045..11737418...178547832...3076165855
.256.56.64.11017.129586..3244671..80326035..1704685390..41247350230
.512.90.98.28652.452042.15605137.550174620.16297041786.554236736742

Examples

			Some solutions for n=4 k=4
..0..0..1..0. .0..0..1..0. .0..1..0..1. .0..0..1..1. .0..0..0..1
..1..1..0..1. .1..1..0..1. .1..0..1..0. .1..1..0..0. .0..0..1..1
..1..1..1..0. .1..1..1..0. .0..1..0..1. .1..1..0..0. .0..0..1..1
..1..1..0..0. .0..0..0..0. .0..0..1..0. .0..0..1..1. .1..1..0..0
		

Crossrefs

Column 1 is A000079(n-1).
Column 2 is A001611(n+1).
Row 1 is A000045(n-1).

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1)
k=2: a(n) = 2*a(n-1) -a(n-3) for n>4
k=3: a(n) = 2*a(n-1) -a(n-3) for n>6
k=4: [order 15] for n>16
k=5: [order 24] for n>28
Empirical for row n:
n=1: a(n) = a(n-1) +a(n-2) for n>3
n=2: a(n) = 3*a(n-1) +a(n-2) -6*a(n-3) -2*a(n-4) +4*a(n-5)
n=3: [order 20] for n>21
n=4: [order 72] for n>73

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

A157726 a(n) = Fibonacci(n) + 3.

Original entry on oeis.org

3, 4, 4, 5, 6, 8, 11, 16, 24, 37, 58, 92, 147, 236, 380, 613, 990, 1600, 2587, 4184, 6768, 10949, 17714, 28660, 46371, 75028, 121396, 196421, 317814, 514232, 832043, 1346272, 2178312, 3524581, 5702890, 9227468, 14930355, 24157820, 39088172, 63245989, 102334158
Offset: 0

Views

Author

N. J. A. Sloane, Jun 26 2010

Keywords

Crossrefs

Programs

  • Haskell
    a157726 = (+ 3) . a000045
    a157726_list = 3 : 4 : map (subtract 3)
                           (zipWith (+) a157726_list $ tail a157726_list)
    -- Reinhard Zumkeller, Jul 30 2013
  • Magma
    [ Fibonacci(n) + 3: n in [0..40] ]; // Vincenzo Librandi, Apr 24 2011
    
  • Mathematica
    Fibonacci[Range[0,45]]+3 (* Harvey P. Dale, Oct 26 2011 *)
  • PARI
    a(n)=fibonacci(n)+3 \\ Charles R Greathouse IV, Jul 02 2013
    

Formula

G.f.: ( 3-2*x-4*x^2 ) / ( (x-1)*(x^2+x-1) ). - R. J. Mathar, Aug 08 2012
a(0) = 3, a(1) = 4, a(n) = a(n - 2) + a(n - 1) - 3. - Reinhard Zumkeller, Jul 30 2013
Previous Showing 11-20 of 76 results. Next