cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A114557 a(2n-1) = 2*(p-1) and a(2n) = p + 3, where p=prime(n).

This page as a plain text file.
%I A114557 #17 Sep 08 2022 08:45:23
%S A114557 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,
%T A114557 44,84,46,92,50,104,56,116,62,120,64,132,70,140,74,144,76,156,82,164,
%U A114557 86,176,92,192,100,200,104,204,106,212,110,216,112,224,116,252,130,260,134
%N A114557 a(2n-1) = 2*(p-1) and a(2n) = p + 3, where p=prime(n).
%H A114557 G. C. Greubel, <a href="/A114557/b114557.txt">Table of n, a(n) for n = 1..10000</a>
%F A114557 a(2n-1) = A037168(n). a(2n) = A113935(n).
%F A114557 a(n) = ( (3 - (-1)^n)*prime(floor((n+1)/2)) + (1 + 5*(-1)^n) )/2. - _G. C. Greubel_, May 20 2019
%t A114557 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}]]
%t A114557 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 *)
%o A114557 (PARI) {a(n) = ((3-(-1)^n)*prime(floor((n+1)/2)) + (1+5*(-1)^n))/2}; \\ _G. C. Greubel_, May 20 2019
%o A114557 (Magma) [((3-(-1)^n)*NthPrime(Floor((n+1)/2)) + (1+5*(-1)^n))/2: n in [1..70]]; // _G. C. Greubel_, May 20 2019
%o A114557 (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
%K A114557 nonn,easy
%O A114557 1,1
%A A114557 _Roger L. Bagula_, Feb 15 2006