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.

A127932 a(4*n) = 4*n+1, a(4*n+1) = a(4*n+2) = a(4*n+3) = 4*n+4.

This page as a plain text file.
%I A127932 #37 Sep 20 2024 02:04:21
%S A127932 1,4,4,4,5,8,8,8,9,12,12,12,13,16,16,16,17,20,20,20,21,24,24,24,25,28,
%T A127932 28,28,29,32,32,32,33,36,36,36,37,40,40,40,41,44,44,44,45,48,48,48,49,
%U A127932 52,52,52,53,56,56,56,57,60,60,60,61,64,64,64,65,68,68,68,69,72,72,72
%N A127932 a(4*n) = 4*n+1, a(4*n+1) = a(4*n+2) = a(4*n+3) = 4*n+4.
%H A127932 Colin Barker, <a href="/A127932/b127932.txt">Table of n, a(n) for n = 0..1000</a>
%H A127932 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F A127932 G.f.: (1 + 3*x) / (1 - x - x^4 + x^5).
%F A127932 From _Luce ETIENNE_, Jan 28 2017: (Start)
%F A127932 a(n) = a(n-1)+ a(n-4)- a(n-5).
%F A127932 a(n) = (4*n+7-(-1)^n+(-1)^((2*n-1+(-1)^n)/4)-3*(-1)^((2*n+1-(-1)^n)/4))/4.
%F A127932 a(n) = (4*n+7-cos(n*Pi)-2*(cos(n*Pi/2)-2*sin(n*Pi/2)))/4.
%F A127932 (End)
%e A127932 G.f. = 1 + 4*x + 4*x^2 + 4*x^3 + 5*x^4 + 8*x^5 + 8*x^6 + 8*x^7 + 9*x^8 + ...
%t A127932 Table[{n,Table[n+3,3]},{n,1,69,4}]//Flatten (* _Harvey P. Dale_, Nov 08 2016 *)
%t A127932 LinearRecurrence[{1, 0, 0, 1, -1}, {1, 4, 4, 4, 5}, 75] (* _Vincenzo Librandi_, May 01 2018 *)
%o A127932 (PARI) {a(n) = if( n%4==0, n+1, n+4 - (n%4))}; /* _Michael Somos_, Jan 28 2017 */
%o A127932 (PARI) Vec((1 + 3*x) / ((1 - x)^2*(1 + x)*(1 + x^2)) + O(x^100)) \\ _Colin Barker_, Jan 28 2017
%o A127932 (Magma) [Round((4*n+7-(-1)^n+(-1)^((2*n-1+(-1)^n)/4)-3*(-1)^((2*n+1- (-1)^n )/4))/4): n in [0..50]]; // _G. C. Greubel_, Apr 30 2018
%o A127932 (Magma) I:=[1,4,4,4,5]; [n le 5 select I[n] else Self(n-1)+Self(n-4)- Self(n-5): n in [1..80]]; // _Vincenzo Librandi_, May 01 2018
%K A127932 nonn,easy
%O A127932 0,2
%A A127932 _Philippe Deléham_, Apr 06 2007