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 21-30 of 88 results. Next

A278041 The tribonacci representation of a(n) is obtained by appending 0,1,1 to the tribonacci representation of n (cf. A278038).

Original entry on oeis.org

3, 10, 16, 23, 27, 34, 40, 47, 54, 60, 67, 71, 78, 84, 91, 97, 104, 108, 115, 121, 128, 135, 141, 148, 152, 159, 165, 172, 176, 183, 189, 196, 203, 209, 216, 220, 227, 233, 240, 246, 253, 257, 264, 270, 277, 284, 290, 297, 301, 308, 314, 321, 328, 334, 341, 345, 352, 358, 365, 371, 378, 382, 389, 395, 402, 409, 415
Offset: 0

Views

Author

N. J. A. Sloane, Nov 18 2016

Keywords

Comments

This sequence gives the indices k for which A080843(k) = 2, sorted increasingly with offset 0. In the W. Lang link a(n) = C(n). - Wolfdieter Lang, Dec 06 2018
Positions of letter c in the tribonacci word t generated by a->ab, b->ac, c->a, when given offset 0. - Michel Dekking, Apr 03 2019
This sequence gives the positions of the word ac in the tribonacci word t. This follows from the fact that the letter c is always preceded in t by the letter a, and the formula AB = C-1, where A := A003144, B := A003145, C := A003146. - Michel Dekking, Apr 09 2019

Examples

			The tribonacci representation of 7 is 1000 (see A278038), so a(7) has tribonacci representation 1000011, which is 44+2+1 = 47, so a(7) = 47.
		

Crossrefs

By analogy with the Wythoff compound sequences A003622 etc., the nine compounds of A003144, A003145, A003146 might be called the tribonacci compound sequences. They are A278040, A278041, and A319966-A319972.

Formula

a(n) = A003146(n+1) - 1.
a(n) = A003144(A003145(n)). - N. J. A. Sloane, Oct 05 2018
From Wolfdieter Lang, Dec 06 2018: (Start)
a(n) = n + 2 + A(n) + B(n), where A(n) = A278040(n) and B = A278039(n).
a(n) = 7*n + 3 - (z_A(n-1) + 3*z_C(n-1)), where z_A(n) = A276797(n+1) and z_C(n) = A276798(n+1) - 1, n >= 0.
For proofs see the W. Lang link in A080843, eqs. 37 and 40.
a(n) - 1 = B2(n), where B2-numbers are B-numbers from A278039 followed by a C-number from A278041. See a comment and example in A319968.
(End)

A001030 Fixed under 1 -> 21, 2 -> 211.

Original entry on oeis.org

2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2
Offset: 1

Views

Author

Keywords

Comments

If treated as the terms of a continued fraction, it converges to approximately
2.57737020881617828717350576260723346479894963737498275232531856357441\
7024804797827856956758619431996. - Peter Bertok (peter(AT)bertok.com), Nov 27 2001
There are a(n) 1's between successive 2's. - Eric Angelini, Aug 19 2008
Same sequence where 1's and 2's are exchanged: A001468. - Eric Angelini, Aug 19 2008

References

  • Midhat J. Gazale, Number: From Ahmes to Cantor, Section on 'Cleavages' in Chapter 6, Princeton University Press, Princeton, NJ 2000, pp. 203-211.
  • 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

Length of the sequence after 'n' substitution steps is given by the terms of A000129.
Equals A004641(n) + 1.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A000201 as the parent: A000201, A001030, A001468, A001950, A003622, A003842, A003849, A004641, A005614, A014675, A022342, A088462, A096270, A114986, A124841. - N. J. A. Sloane, Mar 11 2021

Programs

  • Haskell
    Following Spage's PARI program.
    a001030 n = a001030_list !! (n-1)
    a001030_list = [2, 1, 1, 2] ++ f [2] [2, 1, 1, 2] where
       f us vs = ws ++ f vs (vs ++ ws) where
                 ws = 1 : us ++ 1 : vs
    -- Reinhard Zumkeller, Aug 04 2014
    
  • Mathematica
    ('n' is the number of substitution steps to perform.) Nest[Flatten[ # /. {1 -> {2, 1}, 2 -> {2, 1, 1}}] &, {1}, n]
    SubstitutionSystem[{1->{2,1},2->{2,1,1}},{2},{6}][[1]] (* Harvey P. Dale, Feb 15 2022 *)
  • PARI
    /* Fast string concatenation method giving e.g. 5740 terms in 8 iterations */
    a="2";b="2,1,1,2";print1(b);for(x=1,8,c=concat([",1,",a,",1,",b]);print1(c);a=b;b=concat(b,c)) \\ K. Spage, Oct 08 2009
    
  • Python
    from math import isqrt
    def A001030(n): return [2, 1, 1, 2, 1, 2, 1, 2][n-1] if n < 9 else -isqrt(m:=(n-9)*(n-9)<<1)+isqrt(m+(n-9<<2)+2) # Chai Wah Wu, Aug 25 2022

Formula

a(n) = -1 + floor(n*(1+sqrt(2))+1/sqrt(2))-floor((n-1)*(1+sqrt(2))+1/sqrt(2)). - Benoit Cloitre, Jun 26 2004. [I don't know if this is a theorem or a conjecture. - N. J. A. Sloane, May 14 2008]
This is a theorem, following from Hofstadter's Generalized Fundamental Theorem of eta-sequences on page 10 of Eta-Lore. See also de Bruijn's paper from 1981 (hint from Benoit Cloitre). - Michel Dekking, Jan 22 2017

Extensions

More terms from Peter Bertok (peter(AT)bertok.com), Nov 27 2001

A004641 Fixed under 0 -> 10, 1 -> 100.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Partial sums: A088462. - Reinhard Zumkeller, Dec 05 2009
Write w(n) = a(n) for n >= 1. Each w(n) is generated by w(i) for exactly one i <= n; let g(n) = i. Each w(i) generates a single 1, in a word (10 or 100) that starts with 1. Therefore, g(n) is the number of 1s among w(1), ..., w(n), so that g = A088462. That is, this sequence is generated by its partial sums. - Clark Kimberling, May 25 2011

Crossrefs

Equals A001030 - 1. Essentially the same as A006337 - 1 and A159684.
Characteristic function of A086377.
Cf. A081477.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A000201 as the parent: A000201, A001030, A001468, A001950, A003622, A003842, A003849, A004641, A005614, A014675, A022342, A088462, A096270, A114986, A124841. - N. J. A. Sloane, Mar 11 2021

Programs

  • Magma
    [Floor(n*(Sqrt(2) - 1) + Sqrt(1/2)) - Floor((n - 1)*(Sqrt(2) - 1) + Sqrt(1/2)): n in [0..100]]; // Vincenzo Librandi, Mar 27 2015
    
  • Maple
    P(0):= (1,0): P(1):= (1,0,0):
    ((P~)@@6)([1]);
    # in Maple 12 or earlier, comment the above line and uncomment the following:
    # (curry(map,P)@@6)([1]); # Robert Israel, Mar 26 2015
  • Mathematica
    Nest[ Flatten[# /. {0 -> {1, 0}, 1 -> {1, 0, 0}}] &, {1}, 5] (* Robert G. Wilson v, May 25 2011 *)
    SubstitutionSystem[{0->{1,0},1->{1,0,0}},{1},5]//Flatten (* Harvey P. Dale, Nov 20 2021 *)
  • Python
    from math import isqrt
    def A004641(n): return [1, 0, 0, 1, 0, 1, 0, 1][n-1] if n < 9 else -1-isqrt(m:=(n-9)*(n-9)<<1)+isqrt(m+(n-9<<2)+2) # Chai Wah Wu, Aug 25 2022

Formula

a(n) = floor(n*(sqrt(2) - 1) + sqrt(1/2)) - floor((n - 1)*(sqrt(2) - 1) + sqrt(1/2)) (from the de Bruijn reference). - Peter J. Taylor, Mar 26 2015
From Jianing Song, Jan 02 2019: (Start)
a(n) = A001030(n) - 1.
a(n) = A006337(n-9) - 1 = A159684(n-10) for n >= 10. (End)

A101864 Wythoff BB numbers.

Original entry on oeis.org

5, 13, 18, 26, 34, 39, 47, 52, 60, 68, 73, 81, 89, 94, 102, 107, 115, 123, 128, 136, 141, 149, 157, 162, 170, 178, 183, 191, 196, 204, 212, 217, 225, 233, 238, 246, 251, 259, 267, 272, 280, 285, 293, 301, 306, 314, 322, 327, 335, 340, 348, 356, 361, 369, 374, 382, 390, 395
Offset: 1

Views

Author

N. J. A. Sloane, Jan 28 2005

Keywords

Comments

a(n)-3 are also the positions of 1 in A188436. - Federico Provvedi, Nov 22 2018
The asymptotic density of this sequence is 1/phi^4 = A094214^4 = 0.145898... . - Amiram Eldar, Mar 24 2025

Crossrefs

Second row of A101858.
Let A = A000201, B = A001950. Then AA = A003622, AB = A003623, BA = A035336, BB = A101864.

Programs

  • Maple
    b:=n->floor(n*((1+sqrt(5))/2)^2): seq(b(b(n)),n=1..60); # Muniru A Asiru, Dec 05 2018
  • Mathematica
    b[n_] := Floor[n * GoldenRatio^2]; a[n_] := b[b[n]]; Array[a, 60] (* Amiram Eldar, Nov 22 2018 *)
  • Python
    from sympy import S
    for n in range(1,60): print(int(S.GoldenRatio**2*(int(n*S.GoldenRatio**2))), end=', ') # Stefano Spezia, Dec 06 2018

Formula

a(n) = B(B(n)), n>=1, with B(k)=A001950(k) (Wythoff B-numbers). a(0)=0 with B(0)=0.

A088462 a(1)=1, a(n) = ceiling((n - a(a(n-1)))/2).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Nov 12 2003

Keywords

Comments

Partial sums of A004641. - Reinhard Zumkeller, Dec 05 2009
This sequence generates A004641; see comment at A004641. - Clark Kimberling, May 25 2011

Crossrefs

Cf. A005206.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A000201 as the parent: A000201, A001030, A001468, A001950, A003622, A003842, A003849, A004641, A005614, A014675, A022342, A088462, A096270, A114986, A124841. - N. J. A. Sloane, Mar 11 2021

Programs

  • Magma
    [Floor((Sqrt(2)-1)*n+1/Sqrt(2)): n in [1..100]]; // Vincenzo Librandi, Jun 26 2017
  • Mathematica
    Table[Floor[(Sqrt[2] - 1) n + 1 / Sqrt[2]], {n, 100}] (* Vincenzo Librandi, Jun 26 2017 *)
  • Python
    l=[0, 1, 1]
    for n in range(3, 101): l.append(n - l[n - 1] - l[l[n - 2]])
    print(l[1:]) # Indranil Ghosh, Jun 24 2017, after Altug Alkan
    

Formula

a(n) = floor((sqrt(2)-1)*n + 1/sqrt(2)).
a(1) = a(2) = 1; a(n) = n - a(n-1) - a(a(n-2)) for n > 2. - Altug Alkan, Jun 24 2017

A114986 Characteristic function of (A000201 prefixed with 0).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 28 2006

Keywords

Crossrefs

Essentially the same as A005614. Cf. A096270, A189479.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A000201 as the parent: A000201, A001030, A001468, A001950, A003622, A003842, A003849, A004641, A005614, A014675, A022342, A088462, A096270, A114986, A124841. - N. J. A. Sloane, Mar 11 2021

A035337 Third column of Wythoff array.

Original entry on oeis.org

3, 11, 16, 24, 32, 37, 45, 50, 58, 66, 71, 79, 87, 92, 100, 105, 113, 121, 126, 134, 139, 147, 155, 160, 168, 176, 181, 189, 194, 202, 210, 215, 223, 231, 236, 244, 249, 257, 265, 270, 278, 283, 291, 299, 304, 312
Offset: 0

Views

Author

Keywords

Comments

Also, positions of 3's in A139764, the smallest term in Zeckendorf representation of n. - John W. Layman, Aug 25 2011
The formula a(n) = 3*A003622(n)-n+1 = 3AA(n)-n+1 conjectured by Layman below is correct, since it is well known that AA(n)+1 = B(n) = A(n)+n, where B = A001950, and so 3AA(n)-n+1 = 3B(n)-n-2 = 3A(n)+2n-2. - Michel Dekking, Aug 31 2017
From Amiram Eldar, Mar 21 2022: (Start)
Numbers k for which the Zeckendorf representation A014417(k) ends with 1, 0, 0.
The asymptotic density of this sequence is 1/phi^4 = 2/(7+3*sqrt(5)), where phi is the golden ratio (A001622). (End)

Crossrefs

Let A = A000201, B = A001950. Then AA = A003622, AB = A003623, BA = A035336, BB = A101864. The eight triples AAA, AAB, ..., BBB are A134859, A134860, A035337, A134862, A134861, A134863, A035338, A134864, resp.

Programs

  • Maple
    t := (1+sqrt(5))/2 ; [ seq(3*floor((n+1)*t)+2*n,n=0..80) ];
  • Mathematica
    Table[3 Floor[n GoldenRatio] + 2 n - 2, {n, 46}] (* Michael De Vlieger, Aug 31 2017 *)
  • PARI
    a(n) = 2*n + 3*floor((1+sqrt(5))*(n+1)/2); \\ Altug Alkan, Sep 18 2017
  • Python
    from sympy import floor
    from mpmath import phi
    def a(n): return 3*floor((n + 1)*phi) + 2*n # Indranil Ghosh, Jun 10 2017
    
  • Python
    from math import isqrt
    def A035337(n): return 3*(n+isqrt(5*n**2)>>1)+(n-1<<1) # Chai Wah Wu, Aug 11 2022
    

Formula

a(n) = F(4)A(n)+F(3)(n-1) = 3A(n)+2n-2, where A = A000201 and F = A000045. - Michel Dekking, Aug 31 2017
It appears that a(n) = 3*A003622(n) - n + 1. - John W. Layman, Aug 25 2011

A102615 Nonprime numbers of order 2.

Original entry on oeis.org

1, 8, 10, 14, 15, 16, 20, 22, 24, 25, 27, 30, 32, 33, 35, 36, 38, 39, 40, 44, 46, 48, 49, 50, 51, 54, 55, 56, 58, 62, 63, 64, 66, 68, 69, 70, 72, 75, 76, 77, 78, 80, 82, 85, 86, 87, 88, 90, 92, 93, 94, 96, 99, 100, 102, 104, 105, 108, 110, 111, 114, 115, 116, 117, 118, 120
Offset: 1

Views

Author

Cino Hilliard, Jan 31 2005

Keywords

Comments

nps(n,0) -> list nonprime(n) or the sequence of nonprime numbers. nps(n,1) -> list nonprime(nonprime(n)) or nps of order 1 nps(n,2) -> list nonprime(nonprime(nonprime(n))) or nps of order 2 ..... The order is the number of nestings - 1. We avoid the nestings in the script with a loop.
Nonprimes (A018252) with nonprime (A018252) subscripts. a(n) U A078782(n) = A018252(n), a(n+1) U A175250(n) = A018252(n) for n >= 1. a(n) = nonprime(nonprime(n)) = A018252(A018252(n)). a(4) = 14 because a(4) = b(b(4)) = b(8) = 14, b = nonprime. a(1) = 1, a(n) = nonprimes (A018252) with composite (A002808) subscripts for n >=2. [Jaroslav Krizek, Mar 13 2010]

Examples

			Nonprime(2) = 4.
Nonprime(4) = 8 the second entry.
		

Crossrefs

Cf. A018252.
Let A = primes A000040, B = nonprimes A018252. The 2-level compounds are AA = A006450, AB = A007821, BA = A078782, BB = A102615. The 3-level compounds AAA, AAB, ..., BBB are A038580, A049078, A270792, A102617, A270794, A270796, A102216.

Programs

  • Maple
    # For Maple code for the prime/nonprime compound sequences (listed in cross-references) see A003622.  - N. J. A. Sloane, Mar 30 2016
  • Mathematica
    nonPrime[n_] := FixedPoint[n + PrimePi[ # ] &, n]; Nest[nonPrime, Range[66], 2] (* Robert G. Wilson v, Feb 04 2005 *)
  • PARI
    \We perform nesting(s) with a loop. cics(n,m) = { local(x,y,z); for(x=1,n, z=x; for(y=1,m+1, z=composite(z); ); print1(z",") ) } composite(n) = \ The n-th composite number. 1 is defined as a composite number. { local(c,x); c=1; x=0; while(c <= n, x++; if(!isprime(x),c++); ); return(x) }

Extensions

Edited by Robert G. Wilson v, Feb 04 2005

A054770 Numbers that are not the sum of distinct Lucas numbers 1,3,4,7,11, ... (A000204).

Original entry on oeis.org

2, 6, 9, 13, 17, 20, 24, 27, 31, 35, 38, 42, 46, 49, 53, 56, 60, 64, 67, 71, 74, 78, 82, 85, 89, 93, 96, 100, 103, 107, 111, 114, 118, 122, 125, 129, 132, 136, 140, 143, 147, 150, 154, 158, 161, 165, 169, 172, 176, 179, 183, 187, 190, 194, 197, 201, 205, 208, 212
Offset: 1

Views

Author

Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr), May 28 2000

Keywords

Comments

Alternatively, Lucas representation of n includes L_0 = 2. - Fred Lunnon, Aug 25 2001
Conjecture: this is the sequence of numbers for which the base phi representation includes phi itself, where phi = (1 + sqrt(5))/2 = the golden ratio. Example: let r = phi; then 6 = r^3 + r + r^(-4). - Clark Kimberling, Oct 17 2012
This conjecture is proved in my paper 'Base phi representations and golden mean beta-expansions', using the formula by Wilson/Agol/Carlitz et al. - Michel Dekking, Jun 25 2019
Numbers whose minimal Lucas representation (A130310) ends with 1. - Amiram Eldar, Jan 21 2023

Crossrefs

Complement of A063732.

Programs

  • Magma
    [Floor(n*(Sqrt(5)+5)/2)-1: n in [1..60]]; // Vincenzo Librandi, Oct 30 2018
    
  • Maple
    A054770 := n -> floor(n*(sqrt(5)+5)/2)-1;
  • Mathematica
    Complement[Range[220],Total/@Subsets[LucasL[Range[25]],5]] (* Harvey P. Dale, Feb 27 2012 *)
    Table[Floor[n (Sqrt[5] + 5) / 2] - 1, {n, 60}] (* Vincenzo Librandi, Oct 30 2018 *)
  • PARI
    a(n)=floor(n*(sqrt(5)+5)/2)-1
    
  • Python
    from math import isqrt
    def A054770(n): return (n+isqrt(5*n**2)>>1)+(n<<1)-1 # Chai Wah Wu, Aug 17 2022

Formula

a(n) = floor(((5+sqrt(5))/2)*n)-1 (conjectured by David W. Wilson; proved by Ian Agol (iagol(AT)math.ucdavis.edu), Jun 08 2000)
a(n) = A000201(n) + 2*n - 1. - Michel Dekking, Sep 07 2017
G.f.: x*(x+1)/(1-x)^2 + Sum_{i>=1} (floor(i*phi)*x^i), where phi = (1 + sqrt(5))/2. - Iain Fox, Dec 19 2017
Ian Agol tells me that David W. Wilson's formula is proved in the Carlitz, Scoville, Hoggatt paper 'Lucas representations'. See Equation (1.12), and use A(A(n))+n = B(n)+n-1 = A(n)+2*n-1, the well known formulas for the lower Wythoff sequence A = A000201, and the upper Wythoff sequence B = A001950. - Michel Dekking, Jan 04 2018

Extensions

More terms from James Sellers, May 28 2000

A060143 a(n) = floor(n/tau), where tau = (1 + sqrt(5))/2.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Mar 05 2001

Keywords

Comments

Fibonacci base shift right: for n >= 0, a(n+1) = Sum_{k in A_n} F_{k-1}, where n = Sum_{k in A_n} F_k (unique) expression of n as a sum of "noncontiguous" Fibonacci numbers (with index >=2). - Michele Dondi (bik.mido(AT)tiscalenet.it), Dec 30 2001 [corrected, and aligned with sequence offset by Peter Munn, Jan 10 2018]
Numerators a(n) of fractions slowly converging to phi, the golden ratio: let a(1) = 0, b(n) = n - a(n); if (a(n) + 1) / b(n) < (1 + sqrt(5))/2, then a(n+1) = a(n) + 1, else a(n+1) = a(n). a(n) + b(n) = n and as n -> +infinity, a(n) / b(n) converges to (1 + sqrt(5))/2. For all n, a(n) / b(n) < (1 + sqrt(5))/2. - Robert A. Stump (bee_ess107(AT)msn.com), Sep 22 2002
a(10^n) gives the first few digits of phi=(sqrt(5)-1)/2.
Comment corrected, two alternative ways, by Peter Munn, Jan 10 2018: (Start)
(a(n) = a(n+1) or a(n) = a(n-1)) if and only if a(n) is in A066096.
a(n+1) = a(n+2) if and only if n is in A003622.
(End)
From Wolfdieter Lang, Jun 28 2011: (Start)
a(n+1) counts for n >= 1 the number of Wythoff A-numbers not exceeding n.
a(n+1) counts also the number of Wythoff B-numbers smaller than A(n+2), with the Wythoff A- and B-sequences A000201 and A001950, respectively.
a(n+1) = Sum_{j=1..n} A005614(j-1) for n >= 1 (no rounding problems like in the above definition, because the rabbit sequence A005614(n-1) for n >= 1, can be defined by a substitution rule).
a(n+1) = A(n+1)-(n+1) (serving, together with the last equation, as definition for A(n+1), given the rabbit sequence).
a(n+1) = A005206(n), n >= 0.
(End)
Let b(n) = floor((n+1)/phi). Then b(n) + b(b(n-1)) = n [Granville and Rasson]. - N. J. A. Sloane, Jun 13 2014

Examples

			a(6)= 3 so b(6) = 6 - 3 = 3. a(7) = 4 because (a(6) + 1) / b(6) = 4/3 which is < (1 + sqrt(5))/2. So b(7) = 7 - 4 = 3. a(8) = 4 because (a(7) + 1) / b(7) = 5/3 which is > (1 + sqrt(5))/2. - Robert A. Stump (bee_ess107(AT)msn.com), Sep 22 2002
From _Wolfdieter Lang_, Jun 28 2011: (Start)
There are a(4) = 2 (positive) Wythoff A-numbers <= 3, namely 1 and 3.
There are a(4) = 2 (positive) Wythoff B-numbers < A(4) = 6, namely 2 and 5.
a(4) = 2 = A(4) - 4 = 6 - 4.
(End)
		

Crossrefs

Cf. A000045 (Fibonacci numbers), A003622, A022342, A035336.
Terms that occur only once: A001950.
Terms that occur twice: A066096 (a version of A000201).
Numerator sequences for other values, as described in Robert A. Stump's 2002 comment: A074065 (sqrt(3)), A074840 (sqrt(2)).
Apart from initial terms, same as A005206.
First differences: A096270 (a version of A005614).
Partial sums: A183136.

Programs

  • Magma
    [Floor(2*n/(1+Sqrt(5))): n in [0..80]]; // Vincenzo Librandi, Mar 29 2015
    
  • Mathematica
    Floor[Range[0,80]/GoldenRatio] (* Harvey P. Dale, May 09 2013 *)
  • PARI
    { default(realprecision, 10); p=(sqrt(5) - 1)/2; for (n=0, 1000, write("b060143.txt", n, " ", floor(n*p)); ) } \\ Harry J. Smith, Jul 02 2009
    
  • Python
    from math import isqrt
    def A060143(n): return (n+isqrt(5*n**2)>>1)-n # Chai Wah Wu, Aug 10 2022

Formula

a(n) = floor(phi(n)), where phi=(sqrt(5)-1)/2. [corrected by Casey Mongoven, Jul 18 2008]
a(F_n + 1) = F_{n-1} if F_n is the n-th Fibonacci number. [aligned with sequence offset by Peter Munn, Jan 10 2018]
a(1) = 0. b(n) = n - a(n). If (a(n) + 1) / b(n) < (1 + sqrt(5))/2, then a(n+1) = a(n) + 1, else a(n+1) = a(n). - Robert A. Stump (bee_ess107(AT)msn.com), Sep 22 2002 [corrected by Peter Munn, Jan 07 2018]
A006336(n) = A006336(n-1) + A006336(a(n)) for n>1. - Reinhard Zumkeller, Oct 24 2007
a(n) = floor(n*phi) - n, where phi = (1+sqrt(5))/2. - William A. Tedeschi, Mar 06 2008
Celaya and Ruskey give an interesting formula for a(n). - N. J. A. Sloane, Jun 13 2014

Extensions

I merged three identical sequences to create this entry. Some of the formulas may need their initial terms adjusting now. - N. J. A. Sloane, Mar 05 2003
More terms from William A. Tedeschi, Mar 06 2008
Previous Showing 21-30 of 88 results. Next