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.

A088441 a(n) = n if n == 0 (mod 3), a(n) = 1 if n == 2 (mod 3), otherwise a(n) = floor((n-2)/2).

This page as a plain text file.
%I A088441 #12 Dec 05 2022 04:40:46
%S A088441 1,3,1,1,6,2,1,9,4,1,12,5,1,15,7,1,18,8,1,21,10,1,24,11,1,27,13,1,30,
%T A088441 14,1,33,16,1,36,17,1,39,19,1,42,20,1,45,22,1,48,23,1,51,25,1,54,26,1,
%U A088441 57,28,1,60,29,1,63,31,1,66,32,1,69,34,1,72,35,1,75,37,1,78,38,1,81,40,1
%N A088441 a(n) = n if n == 0 (mod 3), a(n) = 1 if n == 2 (mod 3), otherwise a(n) = floor((n-2)/2).
%H A088441 G. C. Greubel, <a href="/A088441/b088441.txt">Table of n, a(n) for n = 2..5002</a>
%F A088441 a(n) = floor(p(n)/p(n-1)), where p(n) = n!/Product_{j=n-floor(2*n/3)..n-floor(n/3)} j.
%F A088441 From _G. C. Greubel_, Dec 05 2022: (Start)
%F A088441 a(n) = floor( n*Gamma(n - floor(2*n/3))*Gamma(n - floor((n-1)/3))/(Gamma(n - floor(n/3) + 1)*Gamma(n - floor(2*(n-1)/3) - 1)) ).
%F A088441 a(n) = n if n mod 3 = 0, 1 if n mod 3 = 2, otherwise floor((n-2)/2). (End)
%t A088441 p[n_]= n!/Product[i, {i, n -Floor[2*n/3], n -Floor[n/3]}];
%t A088441 Table[Floor[p[n]/p[n-1]], {n,2,100}]
%t A088441 (* Second program *)
%t A088441 a[n_]:= If[Mod[n,3]==0, n, If[Mod[n,3]==2, 1, Floor[(n-2)/2]]];
%t A088441 Table[a[n], {n,2,100}] (* _G. C. Greubel_, Dec 05 2022 *)
%o A088441 (Magma)
%o A088441 function A088441(n)
%o A088441   if (n mod 3) eq 0 then return n;
%o A088441   elif (n mod 3) eq 2 then return 1;
%o A088441   else return Floor((n-2)/2);
%o A088441   end if; return A088441;
%o A088441 end function;
%o A088441 [A088441(n): n in [2..100]]; // _G. C. Greubel_, Dec 05 2022
%o A088441 (SageMath)
%o A088441 def A088441(n):
%o A088441     if (n%3)==0: return n
%o A088441     elif (n%3)==2: return 1
%o A088441     else: return (n-2)//2
%o A088441 [A088441(n) for n in range(2,100)] # _G. C. Greubel_, Dec 05 2022
%Y A088441 Cf. A001651, A088140.
%K A088441 nonn,easy
%O A088441 2,2
%A A088441 _Roger L. Bagula_, Nov 09 2003
%E A088441 Edited by _G. C. Greubel_, Dec 05 2022