This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A080457 a(1)=3; for n>1, a(n)=a(n-1) if n is already in the sequence, a(n)=a(n-1)+4 otherwise. 5
 3, 7, 7, 11, 15, 19, 19, 23, 27, 31, 31, 35, 39, 43, 43, 47, 51, 55, 55, 59, 63, 67, 67, 71, 75, 79, 79, 83, 87, 91, 91, 95, 99, 103, 103, 107, 111, 115, 115, 119, 123, 127, 127, 131, 135, 139, 139, 143, 147, 151, 151, 155, 159, 163, 163, 167, 171, 175 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS 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 (math.NT/0305308) Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1). FORMULA a(n) = 3 + 4*(n-2-floor((n-3)/4)). From Wesley Ivan Hurt, Jul 15 2015: (Start) G.f.: x*(3+4*x+4*x^3+x^4)/((x-1)^2*(1+x+x^2+x^3)). a(n) = a(n-1)+a(n-4)-a(n-5), n>5. a(n) = (6*n-1+(-1)^n-2*(-1)^((2*n+1-(-1)^n)/4))/2. (End) MAPLE A080457:=n->3+4*(n-2-floor((n-3)/4)): seq(A080457(n), n=1..100); # Wesley Ivan Hurt, Jul 15 2015 MATHEMATICA CoefficientList[Series[(3 + 4 x + 4 x^3 + x^4)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Jul 15 2015 *) LinearRecurrence[{1, 0, 0, 1, -1}, {3, 7, 7, 11, 15}, 70] (* Vincenzo Librandi, Jul 16 2015 *) PROG (MAGMA) [3+4*(n-2-Floor((n-3)/4)) : n in [1..100]]; // Wesley Ivan Hurt, Jul 15 2015 (PARI) main(size)={my(v=vector(size), i, j); v[1]=3; for(j=2, size, x=0; for(i=1, j-1, if(v[i]==j, x=1; break)); if(x==1, v[j]=v[j-1], v[j]=v[j-1]+4)); return(v); } /* Anders HellstrÃ¶m, Jul 15 2015 */ CROSSREFS Cf. A080036, A080037, A080455, A080456, A080457, A080458. Sequence in context: A094343 A239126 A179873 * A119644 A109386 A024612 Adjacent sequences:  A080454 A080455 A080456 * A080458 A080459 A080460 KEYWORD nonn,easy AUTHOR N. J. A. Sloane and Benoit Cloitre, Mar 20 2003 STATUS approved

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