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 31 results. Next

A022342 Integers with "even" Zeckendorf expansions (do not end with ...+F_2 = ...+1) (the Fibonacci-even numbers); also, apart from first term, a(n) = Fibonacci successor to n-1.

Original entry on oeis.org

0, 2, 3, 5, 7, 8, 10, 11, 13, 15, 16, 18, 20, 21, 23, 24, 26, 28, 29, 31, 32, 34, 36, 37, 39, 41, 42, 44, 45, 47, 49, 50, 52, 54, 55, 57, 58, 60, 62, 63, 65, 66, 68, 70, 71, 73, 75, 76, 78, 79, 81, 83, 84, 86, 87, 89, 91, 92, 94, 96, 97, 99, 100, 102, 104, 105, 107
Offset: 1

Views

Author

Keywords

Comments

The Zeckendorf expansion of n is obtained by repeatedly subtracting the largest Fibonacci number you can until nothing remains; for example, 100 = 89 + 8 + 3.
The Fibonacci successor to n is found by replacing each F_i in the Zeckendorf expansion by F_{i+1}; for example, the successor to 100 is 144 + 13 + 5 = 162.
If k appears, k + (rank of k) does not (10 is the 7th term in the sequence but 10 + 7 = 17 is not a term of the sequence). - Benoit Cloitre, Jun 18 2002
From Michele Dondi (bik.mido(AT)tiscalenet.it), Dec 30 2001: (Start)
a(n) = Sum_{k in A_n} F_{k+1}, where a(n)= Sum_{k in A_n} F_k is the (unique) expression of n as a sum of "noncontiguous" Fibonacci numbers (with index >= 2).
a(10^n) gives the first few digits of g = (sqrt(5)+1)/2.
The sequences given by b(n+1) = a(b(n)) obey the general recursion law of Fibonacci numbers. In particular the (sub)sequence (of a(-)) yielded by a starting value of 2=a(1), is the sequence of Fibonacci numbers >= 2. Starting points of all such subsequences are given by A035336.
a(n) = floor(phi*n+1/phi); phi = (sqrt(5)+1)/2. a(F_n)=F_{n+1} if F_n is the n-th Fibonacci number.
(End)
From Amiram Eldar, Sep 03 2022: (Start)
Numbers with an even number of trailing 1's in their dual Zeckendorf representation (A104326), i.e., numbers k such that A356749(k) is even.
The asymptotic density of this sequence is 1/phi (A094214). (End)

Examples

			The successors to 1, 2, 3, 4=3+1 are 2, 3, 5, 7=5+2.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 307-308 of 2nd edition.
  • E. Zeckendorf, Représentation des nombres naturels par une somme des nombres de Fibonacci ou de nombres de Lucas, Bull. Soc. Roy. Sci. Liège 41, 179-182, 1972.

Crossrefs

Positions of 0's in A003849.
Complement of A003622.
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
    a022342 n = a022342_list !! (n-1)
    a022342_list = filter ((notElem 1) . a035516_row) [0..]
    -- Reinhard Zumkeller, Mar 10 2013
    
  • Magma
    [Floor(n*(Sqrt(5)+1)/2)-1: n in [1..100]]; // Vincenzo Librandi, Feb 16 2015
    
  • Maple
    A022342 := proc(n)
          local g;
          g := (1+sqrt(5))/2 ;
        floor(n*g)-1 ;
    end proc: # R. J. Mathar, Aug 04 2013
  • Mathematica
    With[{t=GoldenRatio^2},Table[Floor[n*t]-n-1,{n,70}]] (* Harvey P. Dale, Aug 08 2012 *)
  • PARI
    a(n)=floor(n*(sqrt(5)+1)/2)-1
    
  • PARI
    a(n)=(sqrtint(5*n^2)+n-2)\2 \\ Charles R Greathouse IV, Feb 27 2014
    
  • Python
    from math import isqrt
    def A022342(n): return (n+isqrt(5*n**2)>>1)-1 # Chai Wah Wu, Aug 17 2022

Formula

a(n) = floor(n*phi^2) - n - 1 = floor(n*phi) - 1 = A000201(n) - 1, where phi is the golden ratio.
a(n) = A003622(n) - n. - Philippe Deléham, May 03 2004
a(n+1) = A022290(2*A003714(n)). - R. J. Mathar, Jan 31 2015
For n > 1: A035612(a(n)) > 1. - Reinhard Zumkeller, Feb 03 2015
a(n) = A000201(n) - 1. First differences are given in A014675 (or A001468, ignoring its first term). - M. F. Hasler, Oct 13 2017
a(n) = a(n-1) + 1 + A005614(n-2) for n > 1; also a(n) = a(n-1) + A014675(n-2) = a(n-1) + A001468(n-1). - A.H.M. Smeets, Apr 26 2024

Extensions

Name edited by Peter Munn, Dec 07 2021

A014675 The infinite Fibonacci word (start with 1, apply 1->2, 2->21, take limit).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The limiting mean and variance of the first n terms are both equal to the golden ratio (A001622). - Clark Kimberling, Mar 12 2014
Let F = A000045 (Fibonacci numbers). For n >= 3, the first F(n)-2 terms of A014675 form a palindrome; see A001911. If k is not one of the numbers F(n)-2, then the first k terms of A014675 do not form a palindrome. - Clark Kimberling, Jul 14 2014
First differences of A000201. - Tom Edgar, Apr 23 2015 [Editor's note: except for the offset: as for A022342, below. - M. F. Hasler, Oct 13 2017]
Also first differences of A022342 (which starts at offset 1): a(n)=A022342(n+2)-A022342(n+1), n >= 0. Equal to A001468 without its first term: a(n) = A001468(n+1), n >= 0. - M. F. Hasler, Oct 13 2017
The word is a concatenation of three runs: 1, 2, and 22. The limiting proportions of these are respectively 1/2, 1 - phi/2, and (phi - 1)/2, where phi = golden ratio. The mean runlength is (phi + 1)/2. - Clark Kimberling, Dec 26 2010

References

  • D. Gault and M. Clint, "Curiouser and curiouser" said Alice. Further reflections on an interesting recursive function, Internat. J. Computer Math., 26 (1988), 35-43. See Table 2.
  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7, p. 36.
  • G. Melançon, Factorizing infinite words using Maple, MapleTech journal, vol. 4, no. 1, 1997, pp. 34-42, esp. p. 36.

Crossrefs

This is the {2,1} version. The standard form is A003849 (alphabet {0,1}). See also A005614 (alphabet {1,0}), A003842 (alphabet {1,2} instead of {2,1}).
Equals A001468 except for initial term.
Differs from A025143 in many entries starting at entry 8.
First differences of A000201 and of A022342.
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

  • Maple
    Digits := 50: t := evalf( (1+sqrt(5))/2); A014675 := n->floor((n+2)*t)-floor((n+1)*t);
  • Mathematica
    Nest[ Flatten[ # /. {1 -> 2, 2 -> {2, 1}}] &, {1}, 11] (* Robert G. Wilson v *)
    SubstitutionSystem[{1->{2},2->{2,1}},{1},{11}][[1]] (* Harvey P. Dale, Jan 01 2023 *)
  • PARI
    first(n)=my(v=[1],u); while(#vCharles R Greathouse IV, Jun 21 2017
    
  • PARI
    apply( {A014675(n,r=quadgen(5)-1)=(n+2)\r-(n+1)\r}, [0..99]) \\ M. F. Hasler, Apr 07 2021, improved on suggestion from Kevin Ryde, Apr 23 2021
    
  • Python
    from math import isqrt
    def A014675(n): return (n+2+isqrt(m:=5*(n+2)**2)>>1)-(n+1+isqrt(m-10*n-15)>>1) # Chai Wah Wu, Aug 10 2022

Formula

Define strings S(0)=1, S(1)=2, S(n)=S(n-1).S(n-2) for n>=2. Sequence is S(infinity).
a(n) = floor((n+2)*phi) - floor((n+1)*phi) = A000201(n+2) - A000201(n+1), phi = (1 + sqrt(5))/2.

Extensions

Corrected by N. J. A. Sloane, Nov 07 2001

A096270 Fixed point of the morphism 0->01, 1->011.

Original entry on oeis.org

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, 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, Jun 22 2004

Keywords

Comments

This is another version of the Fibonacci word A005614.
(With offset 1) for k>0, a(ceiling(k*phi^2))=0 and a(floor(k*phi^2))=1 where phi=(1+sqrt(5))/2 is the Golden ratio. - Benoit Cloitre, Apr 01 2006
(With offset 1) for n>1 a(A000045(n)) = (1-(-1)^n)/2.
Equals the Fibonacci word A005614 with an initial zero.
Also the Sturmian word of slope phi (cf. A144595). - N. J. A. Sloane, Jan 13 2009
More precisely: (a(n)) is the inhomogeneous Sturmian word of slope phi-1 and intercept 0: a(n) = floor((n+1)*(phi-1)) - floor(n*(phi-1)), n >= 0. - Michel Dekking, May 21 2018
The ratio of number of 1's to number of 0's tends to the golden ratio (1+sqrt(5))/2 = 1.618... - Zak Seidov, Feb 15 2012

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003.

Crossrefs

Cf. A003849, A096268, A001519. See A005614, A114986 for other versions.
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
    [-1+Floor(n*(1+Sqrt(5))/2)-Floor((n-1)*(1+Sqrt(5))/2): n in [1..100]]; // Wesley Ivan Hurt, Aug 29 2022
  • Mathematica
    Nest[ Function[l, {Flatten[(l /. {0 -> {0, 1}, 1 -> {0, 1, 1}})]}], {0}, 6] (* Robert G. Wilson v, Feb 04 2005 *)
  • PARI
    a(n)=-1+floor(n*(1+sqrt(5))/2)-floor((n-1)*(1+sqrt(5))/2) \\ Benoit Cloitre, Apr 01 2006
    
  • Python
    from math import isqrt
    def A096270(n): return (n+1+isqrt(5*(n+1)**2)>>1)-(n+isqrt(5*n**2)>>1)>>1 # Chai Wah Wu, Aug 29 2022
    

Formula

Conjecture: a(n) is given recursively by a(1)=0 and, for n>1, by a(n)=1 if n=F(2k+1) and a(n)=a(n-F(2k+1)) otherwise, where F(2k+1) is the largest odd-indexed Fibonacci number smaller than or equal to n. (This has been confirmed for more than nine million terms.) The odd-indexed bisection of the Fibonacci numbers (A001519) is {1, 2, 5, 13, 34, 89, ...}. So by the conjecture, we would expect that a(30) = a(30-13) = a(17) = a(17-13) = a(4) = a(4-2) = a(2) = 1, which is in fact correct. - John W. Layman, Jun 29 2004
From Michel Dekking, Apr 13 2016: (Start)
Proof of the above conjecture:
Let g be the morphism above: g(0)=01, g(1)=011. Then g^n(0) has length F(2n+1), and (a(n)) starts with g^n(0) for all n>0. Obviously g^n(0) ends in 1 for all n, proving the first part of the conjecture.
We extend the semigroup of words with letters 0 and 1 to the free group, adding the inverses 0*:=0^{-1} and 1*:=1^{-1}. Easy observation: for any word w one has g(w1)= g(w0)1. We claim that for all n>1 one has g^n(0)=u(n)v(n)v(n)0*1, where u(n)=g(u(n-1))0 and v(n)=0*g(v(n-1))0. The recursion starts with u(2)=0, v(2)=10. Indeed: g^2(0)=01011=u(2)v(2)v(2)0*1. Induction step:
g^{n+1}(0)=g(g^n(0))= g(u(n)v(n)v(n)0*1)= g(u(n)v(n)v(n))1= g(u(n))00*g(v(n))00*g(v(n))00*1=u(n+1)v(n+1)v(n+1)0*1.
Since v(n) has length F(2n-1), which is the largest odd-indexed Fibonacci number smaller than or equal to m for all m between F(2n-1) and F(2n+1), the claim proves the second part of the conjecture. (End)
(With offset 1) a(n) = -1 + floor(n*phi) - floor((n-1)*phi) where phi=(1+sqrt(5))/2 so a(n) = -1 + A082389(n). - Benoit Cloitre, Apr 01 2006

Extensions

More terms from John W. Layman, Jun 29 2004

A066096 a(n) = floor(n*phi), where phi = (1 + sqrt(5))/2.

Original entry on oeis.org

0, 1, 3, 4, 6, 8, 9, 11, 12, 14, 16, 17, 19, 21, 22, 24, 25, 27, 29, 30, 32, 33, 35, 37, 38, 40, 42, 43, 45, 46, 48, 50, 51, 53, 55, 56, 58, 59, 61, 63, 64, 66, 67, 69, 71, 72, 74, 76, 77, 79, 80, 82, 84, 85, 87, 88, 90, 92, 93, 95, 97, 98, 100, 101, 103, 105, 106
Offset: 0

Views

Author

Michele Dondi (bik.mido(AT)tiscalenet.it), Dec 30 2001

Keywords

Comments

a(n) is the smallest number different from a(i) and a(i)+i for i < n.
The losing positions in the game of Wythoff-Nim are precisely the pairs (a(n), a(n)+n).

Crossrefs

Programs

  • Magma
    [Floor((1+Sqrt(5))*n/2): n in [0..80]]; // G. C. Greubel, Sep 12 2023
    
  • Mathematica
    Floor[GoldenRatio*Range[0, 80]] (* G. C. Greubel, Sep 12 2023 *)
  • PARI
    a(n) = (n+sqrtint(5*n^2))\2;
    [a(n)|n<-[0..100]] \\ Simon Strandgaard, Jun 28 2022
    
  • SageMath
    [floor(golden_ratio*n) for n in range(81)] # G. C. Greubel, Sep 12 2023

Formula

For n >= 1, a(n) = A000201(n).
Duplicate values in A060143.
a(n) = 1 + A022342(n) = A000201(n).
a(n) = floor(n*phi), where phi = (1 + sqrt(5))/2. - Peter Munn, Jan 12 2018
a(n) = A026351(n) - 1. - Philippe Deléham, Jan 15 2023

Extensions

Name corrected by Peter Munn, Dec 06 2017
New name using a formula from Peter Munn by Peter Luschny, Jan 18 2023

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)

A019446 a(n) = ceiling(n/tau), where tau = (1+sqrt(5))/2.

Original entry on oeis.org

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

Views

Author

R. K. Guy, Tom Halverson (halverson(AT)macalester.edu)

Keywords

Comments

Average of first n terms of A019444, which is defined to be a permutation of the positive integers, p_1, p_2, ..., such that the average of each initial segment is an integer, using the greedy algorithm to define p_n.
Number of pairs (i,j) of nonnegative integers such that n-1=floor(i+j*tau). - Clark Kimberling, Jun 18 2002
The terms that occur exactly once are 1,3,6,8,..., given by A026352(n)=n+1+floor(n*tau). - Clark Kimberling, Jun 18 2002
The number n appears A001468(n) times. - Reinhard Zumkeller, Feb 02 2012
It seems that the indices of the terms that occur exactly once are listed in A276885. - Ivan N. Ianakiev, Aug 30 2018
From Michel Dekking, Oct 13 2020: (Start)
Here is a proof of the conjecture by Ivan N. Ianakiev. Let b = (b(n)) be the sequence of occurrences of the "singleton terms" in (a(n)). We have to show that b = A276885.
In the following phi := (1+sqrt(5))/2 (so phi = tau).
By its definition, the sequence (a(n)) is a generalized Beatty sequence with terms a(n) = floor(phi*n)-n+1, since 1/phi = phi-1. So by Lemma 8 in the paper by Allouche and Dekking, its sequence of first differences Delta = 1011010110..., given by Delta(n) = a(n+1)-a(n), is equal to y, where y = A005614 is the binary complement of the Fibonacci word. By definition, y is the fixed point of the morphism nu: 0->1, 1->10.
The crucial observation is that a term occurs exactly once in (a(n)) if and only if the word 11 of length 2 occurs in Delta (with an exception for a(1)=1). So to obtain the sequence b of occurrences of these "singleton terms", we have to study the return words of 11 in y. (The return words of 11 in y are the words occurring in y that start with 11, and having no other occurrences of 11.)
The return words of 11 are the words A:=11010, and B:=110. Since
nu(A) = nu(11010) = 10101101, nu(B) = nu(110) = 10101,
the morphism nu induces a descendant morphism tau given by
tau(A) = BA, tau(B) = A.
So tau is nothing else but the Fibonacci morphism on the alphabet {B,A}.
Since the words A and B have lengths 5 and 3, the first differences b(n+1)-b(n) are given by the fixed point z = 5353353533... of the Fibonacci morphism on the alphabet {5,3}.
From Lemma 8 in the paper by Allouche and Dekking we then obtain that the sequence b is a generalized Beatty sequence
V(n) = (5-3)*floor(phi*n)+(2*3-5)*n+r = 2*floor(phi*n)+n+r, for some integer r.
Starting at the value 4, filling in n=1, we obtain that r=1, and so V(n) = 2*floor(phi*n)+n+1. To incorporate also the first "singleton term" a(1)=1, we take
b(n) = V(n-1) = 2*floor(phi*(n-1))+n-1+1 = 2*floor(phi*(n-1))+n.
Then, indeed, b(n) = A276885(n), for n=1,2,... (see my Comment in A276885).
(End)
It seems that the indices of the records are listed in A026351. - Ivan N. Ianakiev, Mar 25 2021

Examples

			a(6)=4 since 6-1=[i+j*tau] for these (i,j): (5,0), (4,1), (2,2), (1,3). - _Clark Kimberling_, Jun 18 2002
		

Crossrefs

Programs

  • GAP
    a:=[1];; for n in [2..80] do a[n]:=n+1-a[a[n-1]]; od; a; # Muniru A Asiru, Aug 30 2018
    
  • Haskell
    a019446 n = a019446_list !! (n-1)
    a019446_list = 1 : zipWith (-) [3..] (map a019446 a019446_list)
    -- Reinhard Zumkeller, Feb 02 2012
    
  • Maple
    A019446:=n->ceil(2*n/(1+sqrt(5))); seq(A019446(n), 1..100); # Wesley Ivan Hurt, Jan 19 2014
  • Mathematica
    Ceiling[Range[80]/GoldenRatio] (* Harvey P. Dale, Aug 02 2011 *)
  • Python
    from math import isqrt
    def A019446(n): return (n+isqrt(5*n**2)>>1)-n+1 # Chai Wah Wu, Aug 09 2022

Formula

a(1)=1; a(n) = n+1 - a(a(n-1)). - Benoit Cloitre, Nov 06 2002
a(n) = A005206(n-1) + 1. - Reinhard Zumkeller, Feb 02 2012; corrected by Primoz Pirnat, Dec 28 2020
a(n) = A019445(n) / n. - Sean A. Irvine, Mar 17 2019

Extensions

Better name from David Radcliffe and John Rickard, Dec 12 2000
Edited by Dean Hickerson, Nov 09 2002

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

A060144 a(n) = floor(n/(1+tau)), or equivalently floor(n/(tau)^2), where tau is the golden ratio (A001622).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Mar 05 2001

Keywords

Comments

The RUNS transform of this sequence appears to be yet another version of the Fibonacci word (cf. A001468, A001950, A076662). - N. J. A. Sloane, Mar 29 2025

Crossrefs

Programs

  • Haskell
    a060144 n = a060144_list !! n
    a060144_list = 0 : 0 : scanl1 (+) a003849_list
    -- Reinhard Zumkeller, Apr 07 2012
    
  • Maple
    A060144 := proc(n)
        (3+sqrt(5))/2 ;
        floor(n/%) ;
    end proc:
    seq(A060144(n),n=0..100) ; # R. J. Mathar, Jul 29 2021
  • Mathematica
    Table[Floor[n/GoldenRatio^2], {n, 0, 100}] (* T. D. Noe, Dec 10 2011 *)
  • PARI
    { default(realprecision, 10); f=2/(sqrt(5) + 3); for (n=0, 1000, write("b060144.txt", n, " ", floor(n*f)); ) } \\ Harry J. Smith, Jul 02 2009
    
  • Python
    from math import isqrt
    def A060144(n): return (n<<1)-1-(n+isqrt(5*n**2)>>1) if n else 0 # Chai Wah Wu, Aug 09 2022

Formula

For n>0, a(n)=n reduced modulo A005206(n). - Benoit Cloitre, Jan 01 2003
Let n' = n-1. Above formula is better as a(n') = n'-A005206(n'). Also a(n') = A005206(A005206(n'-1)). Also a(n'+1) = n'-a(n')-a(n'-a(n')), with a(0) = 0. - Frank Ruskey, Dec 09 2011
a(n+1) = n - A005206(n). - Reinhard Zumkeller, Apr 07 2012
a(n) = floor(n*A132338). - R. J. Mathar, Jul 29 2021
Previous Showing 11-20 of 31 results. Next