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.

A257844 a(n) = floor(n/4) * (n mod 4).

This page as a plain text file.
%I A257844 #26 Jan 27 2023 13:41:03
%S A257844 0,0,0,0,0,1,2,3,0,2,4,6,0,3,6,9,0,4,8,12,0,5,10,15,0,6,12,18,0,7,14,
%T A257844 21,0,8,16,24,0,9,18,27,0,10,20,30,0,11,22,33,0,12,24,36,0,13,26,39,0,
%U A257844 14,28,42,0,15,30,45,0,16,32,48,0,17,34,51,0,18,36
%N A257844 a(n) = floor(n/4) * (n mod 4).
%C A257844 Equivalently, write n in base 4, multiply the last digit by the number with its last digit removed.
%H A257844 Colin Barker, <a href="/A257844/b257844.txt">Table of n, a(n) for n = 0..1000</a>
%H A257844 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,2,0,0,0,-1).
%F A257844 a(n) = 2*a(n-4) - a(n-8), n > 8. - _Colin Barker_, May 11 2015
%F A257844 G.f.: x^5*(3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - _Colin Barker_, May 11 2015
%F A257844 a(n) = (3 - 2*(-1)^((2*n - 1 + (-1)^n)/4) - (-1)^n)*(2*n - 3 + 2*(-1)^((2*n - 1 + (-1)^n)/4) + (-1)^n)/16. - _Wesley Ivan Hurt_, Jun 22 2015
%p A257844 A257844:=n->floor(n/4)*(n mod 4): seq(A257844(n), n=0..100); # _Wesley Ivan Hurt_, Jun 22 2015
%t A257844 Table[Floor[n/4] Mod[n, 4], {n, 0, 100}] (* _Wesley Ivan Hurt_, Jun 22 2015 *)
%o A257844 (PARI) a(n,b=4)=(n=divrem(n,b))[1]*n[2]
%o A257844 (PARI) concat([0,0,0,0,0], Vec(x^5*(3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100))) \\ _Colin Barker_, May 11 2015
%o A257844 (Magma) [Floor(n/4)*(n mod 4) : n in [0..100]]; // _Wesley Ivan Hurt_, Jun 22 2015
%o A257844 (Magma) I:=[0,0,0,0,0,1,2,3]; [n le 8 select I[n] else 2*Self(n-4)-Self(n-8): n in [1..100]]; // _Vincenzo Librandi_, Jun 23 2015
%o A257844 (Python)
%o A257844 def A257844(n): return (n>>2)*(n&3) # _Chai Wah Wu_, Jan 27 2023
%Y A257844 Cf. A142150 (the base-2 analog), A115273, A257845 - A257850.
%K A257844 nonn,base,easy
%O A257844 0,7
%A A257844 _M. F. Hasler_, May 10 2015