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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A090937 a(1) = 1, a(2) = 2; for n > 2, a(n) = a(n-1) + (smallest integer >= n which is coprime to a(n-1)). 1
 1, 2, 5, 9, 14, 23, 30, 41, 50, 61, 72, 85, 98, 113, 128, 145, 162, 181, 200, 221, 242, 265, 288, 313, 338, 365, 392, 421, 450, 481, 512, 545, 578, 613, 648, 685, 722, 761, 800, 841, 882, 925, 968, 1013, 1058, 1105, 1152, 1201, 1250, 1301, 1352, 1405, 1458 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS G. C. Greubel, Table of n, a(n) for n = 1..10000 Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1). FORMULA a(2*n-1) = 2*n^2, a(2*n) = 2*n^2 + 2*n + 1, for n > 4. From Wesley Ivan Hurt, Aug 03 2015: (Start) G.f.: x*(1+x^2+x^3-x^4+3*x^5-3*x^6-2*x^9+2*x^10)/((1-x)^3*(1+x)). a(n) = ceiling((n+1)^2/2) = A000982(n+1), for n > 7. (End) MAPLE A090937:=n->(2*n^2+4*n+3+(-1)^n)/4: (1, 2, 5, 9, 14, 23, 30, seq(A090937(n), n=8..100)); # Wesley Ivan Hurt, Aug 03 2015 MATHEMATICA lst = {}; a = 2; Do[d = n; While[! CoprimeQ[a, d], d++]; a = a + d; AppendTo[lst, a], {n, 3, 53}]; Join[{1, 2}, lst] (* Arkadiusz Wesolowski, Jun 03 2013 *) nxt[{n_, a_}]:=Module[{k=n+1}, While[!CoprimeQ[a, k], k++]; {n+1, a+k}]; Join[ {1}, Transpose[NestList[nxt, {2, 2}, 60]][[2]]] (* Harvey P. Dale, Apr 07 2015 *) CoefficientList[Series[(1+x^2+x^3-x^4+3x^5-3x^6-2x^9+2x^10)/((1-x)^3*(1+ x)), {x, 0, 50}], x] (* or *) Join[{1, 2, 5, 9, 14, 23, 30}, Table[(2n^2 +4n + 3 +(-1)^n)/4, {n, 8, 100}]] (* Wesley Ivan Hurt, Aug 03 2015 *) PROG (PARI) my(x='x+O('x^60)); Vec(x*(1+x^2+x^3-x^4+3*x^5-3*x^6-2*x^9+2*x^10 )/((1-x)^3*(1+x))) \\ G. C. Greubel, Feb 04 2019 (Magma) m:=60; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( x*(1+x^2+x^3-x^4+3*x^5-3*x^6-2*x^9+2*x^10 )/((1-x)^3*(1+x)) )); // G. C. Greubel, Feb 04 2019 (Sage) a=(x*(1+x^2+x^3-x^4+3*x^5-3*x^6-2*x^9+2*x^10 )/((1-x)^3*(1+x)) ).series(x, 60).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 04 2019 (GAP) Concatenation([1, 2, 5, 9, 14, 23, 30], List([8..60], n -> (2*n^2 +4*n +3 +(-1)^n)/4)); # G. C. Greubel, Feb 04 2019 CROSSREFS Cf. A000982. Sequence in context: A098065 A123690 A199935 * A338666 A325717 A291942 Adjacent sequences: A090934 A090935 A090936 * A090938 A090939 A090940 KEYWORD easy,nonn AUTHOR Amarnath Murthy, Dec 29 2003 EXTENSIONS Name changed and sequence extended by Arkadiusz Wesolowski, Jun 03 2013 STATUS approved

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.

Last modified September 12 23:44 EDT 2024. Contains 375855 sequences. (Running on oeis4.)