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.

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

Original entry on oeis.org

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, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2
Offset: 1

Views

Author

Benoit Cloitre, Apr 14 2003

Keywords

Comments

Alternative descriptions (1): unique positive integer sequence taking values in {1,2} satisfying a(1)=1, a(2)=2 and a(a(1)+...+a(n))=a(n) for n >= 3.
(2) Start with 1,2; then for any k>=1, a(a(1)+...+a(k))=a(k), fill in any undefined terms by the rule that a(t) = 1 if a(t-1) = 2 and a(t) = 2 if a(t-1) = 1.
(3) a(1)= 1, a(2)=2, a(a(1)+a(2)+...+a(n))=a(n); a(a(1)+a(2)+...+a(n)+1)=3-a(n).
More generally, the sequence a(n)=floor(r*(n+2))-floor(r*(n+1)), r= (1/2) *(z+sqrt(z^2+4)), z integer >=1, is defined by a(1), a(2) and a(a(1)+a(2)+...+a(n)+f(z))=a(n); a(a(1)+a(2)+...+a(n)+f(z)+1)=(2z+1)-a(n) where f(1)=0, f(z)=z-2 for z>=2.

Examples

			a(1)+a(2)=3 and a(a(1)+a(2)) must be a(2) so a(3)=2. Therefore a(a(1)+a(2)+a(3))=a(5)=2 and from the rule the "hole" a(4) is 1. Hence sequence begins 1,2,2,1,2,...
		

Crossrefs

Same as A014675 without the first term.

Programs

  • Maple
    A082389:=n->floor((n+2)*(1+sqrt(5))/2) - floor((n+1)*(1+sqrt(5))/2): seq(A082389(n), n=1..300); # Wesley Ivan Hurt, Jan 16 2017
  • Mathematica
    Rest@Nest[ Flatten[ # /. {1 -> 2, 2 -> {2, 1}}] &, {1}, 11] (* Robert G. Wilson v, Jan 26 2006 *)
    #[[2]]-#[[1]]&/@Partition[Table[Floor[GoldenRatio n],{n,0,110}],2,1] (* Harvey P. Dale, Sep 04 2019 *)
    Differences[Floor[GoldenRatio Range[2,150]]] (* Harvey P. Dale, Dec 02 2024 *)
  • Python
    from math import isqrt
    def A082389(n): return (n+2+isqrt(m:=5*(n+2)**2)>>1)-(n+1+isqrt(m-10*n-15)>>1) # Chai Wah Wu, Aug 29 2022

Formula

a(n) = A014675(n+1); sum(k = 1, n, a(k)) = A058065(n)
Apparently a(n) = A059426(n).
a(n) = A066096(n+2)-A066096(n+1). - R. J. Mathar, Aug 02 2024

A057843 a(n) = floor(n*tau^2) - 3, where tau = (1+sqrt(5))/2.

Original entry on oeis.org

-1, 2, 4, 7, 10, 12, 15, 17, 20, 23, 25, 28, 31, 33, 36, 38, 41, 44, 46, 49, 51, 54, 57, 59, 62, 65, 67, 70, 72, 75, 78, 80, 83, 86, 88, 91, 93, 96, 99, 101, 104, 106, 109, 112, 114, 117, 120, 122, 125, 127, 130, 133, 135, 138, 140, 143, 146, 148, 151, 154, 156, 159
Offset: 1

Views

Author

N. J. A. Sloane, Nov 24 2000

Keywords

Comments

This sequence and A007064 are very similar - this can be seen if the terms equal to 4 are aligned. - Thomas Baruchel, Nov 04 2003

Crossrefs

Subtract 2 from each term of A003622. Complement of A058065.

Programs

A276419 Non-Fibonacci numbers n such that A129761(n) = 1.

Original entry on oeis.org

6, 9, 11, 14, 16, 18, 19, 22, 24, 26, 27, 29, 30, 32, 35, 37, 39, 40, 42, 43, 45, 47, 48, 50, 52, 53, 56, 58, 60, 61, 63, 64, 66, 68, 69, 71, 73, 74, 76, 77, 79, 81, 82, 84, 85, 87, 90, 92, 94, 95, 97, 98, 100, 102, 103, 105, 107, 108, 110, 111, 113, 115, 116
Offset: 1

Views

Author

Altug Alkan, Sep 03 2016

Keywords

Comments

It appears that this is the intersection of A058065 with A001690 (non-Fibonacci). - Michel Marcus, Sep 05 2016

Crossrefs

Extensions

More terms from Michel Marcus, Sep 04 2016
Showing 1-3 of 3 results.