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!)
A114557 a(2n-1) = 2*(p-1) and a(2n) = p + 3, where p=prime(n). 2
2, 5, 4, 6, 8, 8, 12, 10, 20, 14, 24, 16, 32, 20, 36, 22, 44, 26, 56, 32, 60, 34, 72, 40, 80, 44, 84, 46, 92, 50, 104, 56, 116, 62, 120, 64, 132, 70, 140, 74, 144, 76, 156, 82, 164, 86, 176, 92, 192, 100, 200, 104, 204, 106, 212, 110, 216, 112, 224, 116, 252, 130, 260, 134 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(2n-1) = A037168(n). a(2n) = A113935(n).
a(n) = ( (3 - (-1)^n)*prime(floor((n+1)/2)) + (1 + 5*(-1)^n) )/2. - G. C. Greubel, May 20 2019
MATHEMATICA
Flatten[Table[Abs[Coefficient[Expand[(x+2)(x -(1 +Sqrt[Prime[n]]))*(x - (1 - Sqrt[Prime[n]]))], x, m]], {n, 1, 50}, {m, 0, 1}]]
With[{p = Prime[Floor[(n+1)/2]]}, Table[If[OddQ[n], 2*(p-1), p+3], {n, 1, 70}]] (* G. C. Greubel, May 20 2019 *)
PROG
(PARI) {a(n) = ((3-(-1)^n)*prime(floor((n+1)/2)) + (1+5*(-1)^n))/2}; \\ G. C. Greubel, May 20 2019
(Magma) [((3-(-1)^n)*NthPrime(Floor((n+1)/2)) + (1+5*(-1)^n))/2: n in [1..70]]; // G. C. Greubel, May 20 2019
(Sage) [( (3-(-1)^n)*nth_prime(floor((n+1)/2))+ (1+5*(-1)^n))/2 for n in (1..70)] # G. C. Greubel, May 20 2019
CROSSREFS
Sequence in context: A217469 A132698 A358181 * A085347 A066337 A129491
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Feb 15 2006
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 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)