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!)
A080900 a(1)=1; for n>1, a(n)=a(n-1)-2 if n is already in the sequence, a(n)=a(n-1)+5 otherwise. 14

%I #20 Mar 11 2020 13:25:25

%S 1,6,11,16,21,19,24,29,34,39,37,42,47,52,57,55,60,65,63,68,66,71,76,

%T 74,79,84,89,94,92,97,102,107,112,110,115,120,118,123,121,126,131,129,

%U 134,139,144,149,147,152,157,162,167,165,170,175,173,178,176

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

%H Antti Karttunen, <a href="/A080900/b080900.txt">Table of n, a(n) for n = 1..20000</a> (terms 1..1000 from Ivan Neretin)

%H B. Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="http://www.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.

%F Perhaps this is asymptotic to c_0*n*(1 + c_1/log n + ...), with c_0 near 2 ?

%t Fold[Append[#1, #1[[-1]] + If[MemberQ[#1, #2], -2, 5]] &, {1}, Range[2, 57]] (* _Ivan Neretin_, Mar 03 2016 *)

%o (PARI)

%o up_to = 1001;

%o A080900list(up_to_n) = { my(xs=Map(), v=vector(up_to_n)); mapput(xs,1,1); v[1] = 1; for(n=2,up_to_n, v[n] = v[n-1]+if(mapisdefined(xs,n), -2, +5); mapput(xs,v[n],n)); (v); };

%o v080900 = A080900list(up_to);

%o A080900(n) = v080900[n]; \\ _Antti Karttunen_, Jan 22 2020

%Y Cf. A080912, A080913, A080904, A080914, A080578, A080919, A080922, A080927.

%Y Cf. A080901 (starting value = 2), A080905 (run lengths of first differences).

%K nonn

%O 1,2

%A _N. J. A. Sloane_ and _Benoit Cloitre_, Apr 01 2003

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 April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)