OFFSET
0,2
COMMENTS
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.
Integer solutions to the equation x = ceiling(phi*floor(x/phi)). - Benoit Cloitre, Feb 14 2004
From Benoit Cloitre, Mar 05 2007: (Start)
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:
1* 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
Take the first NP (which is 1) and parenthesize it; mark the least NP (which is 2):
(1*) 2* 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
Take the 2nd NP (which is 3) and parenthesize it; mark the next NP (which is 4):
(1*) 2* (3) 4* 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
Take the 4th NP (which is 6) and parenthesize it; mark the next NP (which is 5):
(1*) 2* (3) 4* 5* (6) 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
Continuing in this way we obtain
(1*) 2* (3) 4* 5* (6) 7* (8) 9* 10* (11) 12* 13* (14) 15* (16) 17* (18) 19* ...
The starred entries (after the first) give the sequence. (End)
From Rick L. Shepherd, Dec 05 2009: (Start)
An equivalent statement of the sieving process described by Benoit Cloitre on Mar 05 2007:
Begin with the natural numbers N. Repeatedly perform these two steps:
i) Let k = N's least remaining term not yet used in Step ii).
ii) Remove the k-th remaining term from N.
The remaining terms of N are the (positive) terms shared by this sequence and A026351.
The PARI program performs this sieving process and prints the positive terms of this sequence. (End)
LINKS
Christian Krause, Table of n, a(n) for n = 0..10000
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, J. Integer Seqs., Vol. 6 (2003), #03.2.2.
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, arXiv:math/0305308 [math.NT], 2003.
MATHEMATICA
Ceiling[Range[0, 100]GoldenRatio] (* Paolo Xausa, Oct 28 2023 *)
PROG
(PARI) {/* paws = Print Absolute values of all elements in vector v With same Sign as sn */
paws(v, sn) = for(m=1, matsize(v)[2], if(sign(v[m])==sign(sn), \
print1(abs(v[m]), ", ")))}
{/* Sieve through lim numbers; make values negative to signify "removed" */
lim=100; v=vector(lim, i, i); i=0; j=0; c=1;
while(i<lim, i++; if(v[i]>0, k=v[i]; c=c--;
while(c<k && j<lim, j++; if(v[j]>0, c++)); v[j]=-v[j])); paws(v, 1)\
/* Changing "1" to "-1" in paws() above prints out the terms of A026352 instead */} \\ Rick L. Shepherd, Dec 05 2009
(PARI) a(n) = ceil(n*(1 + sqrt(5))/2); \\ Michel Marcus, Apr 13 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved