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

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

Original entry on oeis.org

2, 7, 10, 15, 20, 23, 28, 31, 36, 41, 44, 49, 54, 57, 62, 65, 70, 75, 78, 83, 86, 91, 96, 99, 104, 109, 112, 117, 120, 125, 130, 133, 138, 143, 146, 151, 154, 159, 164, 167, 172, 175, 180, 185, 188, 193, 198, 201, 206, 209, 214, 219, 222, 227, 230, 235, 240
Offset: 1

Views

Author

Keywords

Comments

Second column of Wythoff array.
These are the numbers in A022342 that are not images of another value of the same sequence if it is given offset 0. - Michele Dondi (bik.mido(AT)tiscalenet.it), Dec 30 2001
Also, positions of 2's in A139764, the smallest term in Zeckendorf representation of n. - John W. Layman, Aug 25 2011
From Amiram Eldar, Mar 21 2022: (Start)
Numbers k for which the Zeckendorf representation A014417(k) ends with 0, 1, 0.
The asymptotic density of this sequence is sqrt(5)-2. (End)

Crossrefs

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

Programs

  • Haskell
    import Data.List (elemIndices)
    a035336 n = a035336_list !! (n-1)
    a035336_list = elemIndices 0 a005713_list
    -- Reinhard Zumkeller, Dec 30 2011
    
  • Magma
    [2*Floor(n*(1+Sqrt(5))/2)+n-1: n in [1..80]]; // Vincenzo Librandi, Nov 19 2016
    
  • Maple
    Digits := 100: t := (1+sqrt(5))/2; [ seq(2*floor((n+1)*t)+n,n=0..80) ];
  • Mathematica
    Table[2*Floor[n*(1 + Sqrt[5])/2] + n - 1, {n, 50}] (* Wesley Ivan Hurt, Nov 21 2017 *)
    Array[2 Floor[# GoldenRatio] + # - 1 &, 60] (* Robert G. Wilson v, Dec 12 2017 *)
  • Python
    from sympy import floor
    from mpmath import phi
    def a(n): return 2*floor(n*phi) + n - 1 # Indranil Ghosh, Jun 10 2017
    
  • Python
    from math import isqrt
    def A035336(n): return (n+isqrt(5*n**2)&-2)+n-1 # Chai Wah Wu, Aug 17 2022

Formula

a(n) = B(A(n)), with A(k)=A000201(k) and B(k)=A001950(k) (Wythoff BA-numbers).
a(n) = A(n) + A(A(n)), with A(A(n))=A003622(n) (Wythoff AA-numbers).
Equals A022342(A003622(n)+1). - Michele Dondi (bik.mido(AT)tiscalenet.it), Dec 30 2001, sequence reference updated by Peter Munn, Nov 23 2017
a(n) = 2*A003622(n) - (n - 1) = A003623(n) - 1. - Franklin T. Adams-Watters, Jun 30 2009
A005713(a(n)) = 0. - Reinhard Zumkeller, Dec 30 2011
a(n) = A089910(n) - 2. - Bob Selcoe, Sep 21 2014

A026242 a(n) = j if n is L(j), else a(n) = k if n is U(k), where L = A000201, U = A001950 (lower and upper Wythoff sequences).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Every positive integer occurs exactly twice. a(n) is the parent of n in the tree at A074049. - Clark Kimberling, Dec 24 2010
Apparently, if n=F(m) (a Fibonacci number), one of two circumstances arise:
I. a(n)=F(m-1) and a(n-1)=F(m-2). When this happens, a(n) occurs for the first time and a(n-1) occurs for the second time;
II. a(n)=F(m-2) and a(n-1)=F(m-1). When this happens, a(n) occurs for the second time and a(n-1) occurs for the first time. - Bob Selcoe, Sep 18 2014
These are the numerators when all fractions, j/r and k/r^2, are arranged in increasing order (where r = golden ratio and j,k are positive integers). - Clark Kimberling, Mar 02 2015

Crossrefs

Cf. A000045 (Fibonacci numbers).

Programs

  • Mathematica
    mx = 100; gr = GoldenRatio; LW[n_] := Floor[n*gr]; UW[n_] := Floor[n*gr^2]; alw = Array[LW, Ceiling[mx/gr]]; auw = Array[UW, Ceiling[mx/gr^2]]; f[n_] := If[ MemberQ[alw, n], Position[alw, n][[1, 1]], Position[auw, n][[1, 1]]]; Array[f, mx] (* Robert G. Wilson v, Sep 17 2014 *)
  • PARI
    my(A=vector(10^4),i,j=0); while(#A>=i=A000201(j++), A[i]=j; (i=A001950(j))>#A || A[i]=j); A026242=A \\ M. F. Hasler, Sep 16 2014 and Sep 18 2014
    
  • PARI
    A026242=vector(#A002251,n,abs(A002251[n]-n)) \\ M. F. Hasler, Sep 17 2014

Formula

a(n) = a(m) if a(m) has already occurred exactly once and n = a(m) + m; otherwise, a(n) = least positive integer that has not yet occurred.
a(n) = abs(A002251(n) - n).
n = a(n) + a(n-1) unless n = A089910(m); if n = A089910(m), then n = a(n) + a(n-1) - m. - Bob Selcoe, Sep 20 2014
There is a 17-state automaton that accepts the Zeckendorf (Fibonacci) representation of n and a(n), in parallel. See the file a026242.pdf. - Jeffrey Shallit, Dec 21 2023

A276885 Sums-complement of the Beatty sequence for 1 + phi.

Original entry on oeis.org

1, 4, 9, 12, 17, 22, 25, 30, 33, 38, 43, 46, 51, 56, 59, 64, 67, 72, 77, 80, 85, 88, 93, 98, 101, 106, 111, 114, 119, 122, 127, 132, 135, 140, 145, 148, 153, 156, 161, 166, 169, 174, 177, 182, 187, 190, 195, 200, 203, 208, 211, 216, 221, 224, 229, 232, 237
Offset: 1

Views

Author

Clark Kimberling, Oct 01 2016

Keywords

Comments

See A276871 for a definition of sums-complement and guide to related sequences.
This appears to be 1 followed by A089910. - R. J. Mathar, Oct 05 2016
Mathar's conjecture is proved in the paper 'The Frobenius problem for homomorphic embeddings of languages into the integers'. See Example 1 in that paper. - Michel Dekking, Dec 21 2017

Examples

			The Beatty sequence for 1 + phi is A001950 = (2,5,7,10,13,15,18,20,23,26,...), with difference sequence s = A005614 + 2 = (3,2,3,3,2,3,2,3,3,...). The sums s(j)+s(j+1)+...+s(k) include (2,3,5,6,7,8,10,11,13,14,15,16,18,...), with complement (1,4,9,12,17,22,...).
		

References

  • Jeffrey Shallit, "Synchronized Sequences" in Lecture Notes of Computer science 12847 pp 1-19 2021, see page 16.

Crossrefs

Programs

  • Mathematica
    z = 500; r = 1 + GoldenRatio; b = Table[Floor[k*r], {k, 0, z}]; (* A001950 *)
    t = Differences[b]; (* 2 + A003849 *)
    c[k_, n_] := Sum[t[[i]], {i, n, n + k - 1}];
    u[k_] := Union[Table[c[k, n], {n, 1, z - k + 1}]];
    w = Flatten[Table[u[k], {k, 1, z}]]; Complement[Range[Max[w]], w]; (* A276885 *)
  • Python
    from math import isqrt
    def A276885(n): return n+(n-1+isqrt(5*(n-1)**2)&-2) # Chai Wah Wu, May 21 2025

Formula

a(n) = 2[(n-1)phi] + n, where phi = (1+sqrt(5))/2 (see Example 1 in the paper 'The Frobenius problem for homomorphic embeddings of languages into the integers'). - Michel Dekking, Dec 21 2017
a(n) = A035336(n-1)+2 for n>1. - Michel Dekking, Dec 21 2017

Extensions

Name edited and example corrected by Michel Dekking, Oct 30 2016

A194584 Differences of A035336.

Original entry on oeis.org

5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3
Offset: 1

Views

Author

John W. Layman, Aug 29 2011

Keywords

Comments

It appears that this is the Fibonacci word A003849, using 5's and 3's instead of 0's and 1's. In other words, {a(n)} is a fixed point of the morphism 5->53, 3->5.
Proof of this conjecture: since A035336(n) = (2*floor(n*phi) + n - 1) (with phi = (1+sqrt(5))/2) is a generalized Beatty sequence, this follows from Lemma 4 in Allouche and Dekking. - Michel Dekking, Oct 10 2018
Also differences of A089910. - Bob Selcoe, Sep 20 2014
Proof of this conjecture: this follows from the Carlitz-Scoville-Hoggatt theorem: compositions of the Wythoff A and B sequences are generalized Beatty sequences (cf. Theorem 1 in Allouche and Dekking). - Michel Dekking, Oct 10 2018

Crossrefs

Programs

  • Mathematica
    Table[2 Floor[n (1 + Sqrt[5])/2] + n - 1, {n, 1, 100}] // Differences (* Jean-François Alcover, Dec 14 2018 *)

A242082 Nim sequence of game on n counters whose legal moves are removing some number of counters in A027941.

Original entry on oeis.org

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

Views

Author

Nathan Fox, May 03 2014

Keywords

Comments

Aperiodic, ternary sequence.
Result of applying the map 0->01, 1->2 to A188432.
Let w(1)=01. For all i>1, let w(i)=w(i-1)w(i-1)w(i-2)...w(2)w(1)2 (as a concatenation of words). The limit of this process is this sequence.
Also the Nim sequence of game on n counters whose legal moves are removing either 1 counter or some number of counters in A089910.
a(n+2) = A159917(n), the infinite Fibonacci sequence on {0,1,2}. See also the standard form A270788 of A159917, explaining the formula below. - Michel Dekking, Dec 27 2016

Crossrefs

Formula

a(n)=0 if and only if n=0 or n is in A001950.
a(n)=1 if and only if a(n-1)=0, which happens if and only if n is in A026352.
a(n)=2 if and only if n is in A089910.
Showing 1-5 of 5 results.