login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004956 a(n) = ceiling(n*phi), where phi is the golden ratio, A001622. 12

%I #50 Oct 29 2023 00:32:02

%S 0,2,4,5,7,9,10,12,13,15,17,18,20,22,23,25,26,28,30,31,33,34,36,38,39,

%T 41,43,44,46,47,49,51,52,54,56,57,59,60,62,64,65,67,68,70,72,73,75,77,

%U 78,80,81,83,85,86,88,89

%N a(n) = ceiling(n*phi), where phi is the golden ratio, A001622.

%C a(0)=0, a(1)=2; for n > 1, a(n) = a(n-1) + 2 if n is already in the sequence, a(n) = a(n-1) + 1 otherwise.

%C Integer solutions to the equation x = ceiling(phi*floor(x/phi)). - _Benoit Cloitre_, Feb 14 2004

%C From _Benoit Cloitre_, Mar 05 2007: (Start)

%C The following is an alternative way to obtain this sequence. NP means "term not in parentheses". Write down the natural numbers and mark the least NP, which is 1:

%C 1* 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...

%C Take the first NP (which is 1) and parenthesize it; mark the least NP (which is 2):

%C (1*) 2* 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...

%C Take the 2nd NP (which is 3) and parenthesize it; mark the next NP (which is 4):

%C (1*) 2* (3) 4* 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...

%C Take the 4th NP (which is 6) and parenthesize it; mark the next NP (which is 5):

%C (1*) 2* (3) 4* 5* (6) 7 8 9 10 11 12 13 14 15 16 17 18 19 ...

%C Continuing in this way we obtain

%C (1*) 2* (3) 4* 5* (6) 7* (8) 9* 10* (11) 12* 13* (14) 15* (16) 17* (18) 19* ...

%C The starred entries (after the first) give the sequence. (End)

%C From _Rick L. Shepherd_, Dec 05 2009: (Start)

%C An equivalent statement of the sieving process described by _Benoit Cloitre_ on Mar 05 2007:

%C Begin with the natural numbers N. Repeatedly perform these two steps:

%C i) Let k = N's least remaining term not yet used in Step ii).

%C ii) Remove the k-th remaining term from N.

%C The remaining terms of N are the (positive) terms shared by this sequence and A026351.

%C The terms removed from N (the complement) are A026352's terms (see also A004957).

%C The PARI program performs this sieving process and prints the positive terms of this sequence. (End)

%H Christian Krause, <a href="/A004956/b004956.txt">Table of n, a(n) for n = 0..10000</a>

%H B. Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL6/Cloitre/cloitre2.html">Numerical analogues of Aronson's sequence</a>, J. Integer Seqs., Vol. 6 (2003), #03.2.2.

%H B. Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="https://arxiv.org/abs/math/0305308">Numerical analogues of Aronson's sequence</a>, arXiv:math/0305308 [math.NT], 2003.

%t Ceiling[Range[0,100]GoldenRatio] (* _Paolo Xausa_, Oct 28 2023 *)

%o (PARI) {/* paws = Print Absolute values of all elements in vector v With same Sign as sn */

%o paws(v,sn) = for(m=1,matsize(v)[2], if(sign(v[m])==sign(sn),\

%o print1(abs(v[m]),",")))}

%o {/* Sieve through lim numbers; make values negative to signify "removed" */

%o lim=100; v=vector(lim,i,i); i=0; j=0; c=1;

%o while(i<lim, i++; if(v[i]>0, k=v[i]; c=c--;

%o while(c<k && j<lim, j++; if(v[j]>0, c++)); v[j]=-v[j])); paws(v,1)\

%o /* Changing "1" to "-1" in paws() above prints out the terms of A026352 instead} */} \\ _Rick L. Shepherd_, Dec 05 2009

%o (PARI) a(n) = ceil(n*(1 + sqrt(5))/2); \\ _Michel Marcus_, Apr 13 2021

%Y Cf. A001622, A004957, A026352.

%Y Essentially same as A026351.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 02:13 EDT 2024. Contains 371264 sequences. (Running on oeis4.)