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!)
A187715 a(n) = 5*n - (9 + (-1)^n)/2. 1
1, 5, 11, 15, 21, 25, 31, 35, 41, 45, 51, 55, 61, 65, 71, 75, 81, 85, 91, 95, 101, 105, 111, 115, 121, 125, 131, 135, 141, 145, 151, 155, 161, 165, 171, 175, 181, 185, 191, 195, 201, 205, 211, 215, 221, 225 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Numbers congruent to {1,5} mod 10. - Bruno Berselli, Mar 31 2012
LINKS
FORMULA
a(n) = a(n-1) + 4 if n is even, a(n) = a(n-1) + 6 if n is odd.
a(n) = 2*a(n-1) - a(n-2) - 2*(-1)^n.
From R. J. Mathar, Mar 15 2011: (Start)
G.f.: x*(1 + 4*x + 5*x^2)/( (1+x)*(1-x)^2 ).
Bisections: a(2*n+1) = A017281(n), a(2*n) = A017329(n-1). (End)
a(n) = 5*(n-1) bitwise-OR 1. - Jon Maiga, Nov 24 2018
E.g.f.: ((10*x-9)*exp(x) - exp(-x) + 10)/2. - G. C. Greubel, Dec 04 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(5+2*sqrt(5))*Pi/20 + 3*log(phi)/(4*sqrt(5)) + log(5)/8, where phi is the golden ratio (A001622). - Amiram Eldar, Apr 15 2023
MAPLE
[5*n-(9+(-1)^n)/2$n=1..50]; # Muniru A Asiru, Nov 25 2018
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[EvenQ[n+1], a+4, a+6]}; Transpose[NestList[nxt, {1, 1}, 50]][[2]] (* Harvey P. Dale, Feb 16 2013 *)
Table[BitOr[5*n, 1], {n, 0, 50}] (* Jon Maiga, Nov 24 2018 *)
PROG
(Magma) [5*n -(9+(-1)^n)/2: n in [1..60]];
(GAP) Filtered([1..250], n-> n mod 10 =1 or n mod 10 = 5); # Muniru A Asiru, Nov 25 2018
(Python) for n in range(1, 60): print(int(5*n - (9 + (-1)**n)/2), end=', ') # Stefano Spezia, Nov 30 2018
(PARI) vector(50, n, (10*n -9-(-1)^n)/2) \\ G. C. Greubel, Dec 04 2018
(Sage) [(10*n -9-(-1)^n)/2 for n in (1..50)] # G. C. Greubel, Dec 04 2018
CROSSREFS
Cf. A001622, A010711 (first differences), A017281, A017329.
Sequence in context: A036787 A182664 A299976 * A314038 A314039 A314040
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 13 2011
EXTENSIONS
Definition rewritten by R. J. Mathar, Mar 15 2011
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:21 EDT 2024. Contains 371926 sequences. (Running on oeis4.)