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.

A244587 a(n) = n OR 5.

This page as a plain text file.
%I A244587 #29 Jan 19 2023 02:23:07
%S A244587 5,5,7,7,5,5,7,7,13,13,15,15,13,13,15,15,21,21,23,23,21,21,23,23,29,
%T A244587 29,31,31,29,29,31,31,37,37,39,39,37,37,39,39,45,45,47,47,45,45,47,47,
%U A244587 53,53,55,55,53,53,55,55,61,61,63,63,61,61,63,63,69,69,71,71
%N A244587 a(n) = n OR 5.
%F A244587 a(n) = (n+5) - (n AND 5).
%F A244587 a(n) = (n XOR 5) + (n AND 5).
%F A244587 a(n) = n +((n+1) mod 2)+4*floor(((n+4) mod 8)/4).
%F A244587 a(n) = (2*n + 4*(-1)^floor(n/4) + (-1)^n + 5)/2. - _Bruno Berselli_, Jul 01 2014
%F A244587 G.f.: (x^6+x^4-3*x^2+5)/((x+1)*(x^4+1)*(x-1)^2). - _Alois P. Heinz_, Jul 01 2014
%p A244587 with(Bits): seq(Or(n,5), n = 0..60);
%o A244587 (Magma) [BitwiseOr(n, 5): n in [0..80]]; // _Bruno Berselli_, Jul 01 2014
%o A244587 (Python)
%o A244587 def A244587(n): return n|5 # _Chai Wah Wu_, Jan 18 2023
%o A244587 (PARI) a(n) = bitor(n, 5); \\ _Michel Marcus_, Jan 19 2023
%Y A244587 Cf. similar sequences of the type n OR k: A109613 (k=1), A174091 (k=2), A244584 (k=3), A244586 (k=4), this sequence (k=5), A244588 (k=6).
%K A244587 nonn,easy
%O A244587 0,1
%A A244587 _Gary Detlefs_, Jun 30 2014
%E A244587 Some terms corrected by _Bruno Berselli_, Jul 01 2014