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.

A271324 a(n) = n + floor(n/4) + (n mod 4).

This page as a plain text file.
%I A271324 #21 Jan 30 2023 02:19:16
%S A271324 0,2,4,6,5,7,9,11,10,12,14,16,15,17,19,21,20,22,24,26,25,27,29,31,30,
%T A271324 32,34,36,35,37,39,41,40,42,44,46,45,47,49,51,50,52,54,56,55,57,59,61,
%U A271324 60,62,64,66,65,67,69,71,70,72,74,76,75,77,79,81,80,82,84,86,85,87,89
%N A271324 a(n) = n + floor(n/4) + (n mod 4).
%C A271324 Sort the terms in increasing order and add 1 to get sequence A032769.
%H A271324 Bruno Berselli, <a href="/A271324/b271324.txt">Table of n, a(n) for n = 0..1000</a>
%H A271324 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F A271324 O.g.f.: x*(2 + 2*x + 2*x^2 - x^3)/((1 - x)^2*(1 + x + x^2 + x^3)).
%F A271324 E.g.f.: ((6 + 5*x)*sinh(x) + (3 + 5*x)*cosh(x) - 3*(sin(x) + cos(x)))/4.
%F A271324 a(n) = 1 + (10*n - 6*(-1)^((n-1)*n/2) - 3*(-1)^n + 1)/8.
%F A271324 a(4*k + r) = 5*k + 2*r, with r = 0, 1, 2 or 3.
%F A271324 a(n + 4*k) = a(n) + 5*k.
%t A271324 Table[n + Floor[n/4] + Mod[n, 4], {n, 0, 80}]
%o A271324 (PARI) vector(80, n, n--; n + floor(n/4) + n%4)
%o A271324 (Sage) [n + floor(n/4) + n%4 for n in (0..80)]
%o A271324 (Maxima) makelist(n + floor(n/4) + mod(n, 4), n, 0, 80);
%o A271324 (Magma) [n + Floor(n/4) + (n mod 4): n in [0..80]];
%o A271324 (Python)
%o A271324 def A271324(n): return n+(n>>2)+(n&3) # _Chai Wah Wu_, Jan 29 2023
%Y A271324 Cf. A032769.
%Y A271324 Cf. numbers of the form m + floor(m/k) + (m mod k): A028242 (k=-2), A000004 (k=-1), A005843 (k=1), A007494 (k=2), A063224 (k=3).
%K A271324 nonn,easy
%O A271324 0,2
%A A271324 _Bruno Berselli_, Apr 04 2016