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.

A047613 Numbers that are congruent to {1, 2, 4, 5} mod 8.

This page as a plain text file.
%I A047613 #24 Sep 08 2022 08:44:57
%S A047613 1,2,4,5,9,10,12,13,17,18,20,21,25,26,28,29,33,34,36,37,41,42,44,45,
%T A047613 49,50,52,53,57,58,60,61,65,66,68,69,73,74,76,77,81,82,84,85,89,90,92,
%U A047613 93,97,98,100,101,105,106,108,109,113,114,116,117,121,122,124
%N A047613 Numbers that are congruent to {1, 2, 4, 5} mod 8.
%H A047613 Bruno Berselli, <a href="/A047613/b047613.txt">Table of n, a(n) for n = 1..1000</a>
%H A047613 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F A047613 From _Bruno Berselli_, Jul 17 2012: (Start)
%F A047613 G.f.: x*(1+x+2*x^2+x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2)).
%F A047613 a(n) = 2*n-2-((-1)^n+i^(n*(n+1)))/2, where i=sqrt(-1). (End)
%F A047613 From _Wesley Ivan Hurt_, Jun 02 2016: (Start)
%F A047613 a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
%F A047613 a(2k) = A047617(k), a(2k-1) = A047461(k). (End)
%F A047613 E.g.f.: (6 + sin(x) - cos(x) + (4*x - 3)*sinh(x) + (4*x - 5)*cosh(x))/2. - _Ilya Gutkovskiy_, Jun 02 2016
%F A047613 Sum_{n>=1} (-1)^(n+1)/a(n) = (2*sqrt(2)-1)*Pi/16 + sqrt(2)*log(sqrt(2)+2)/4 - (sqrt(2)+1)*log(2)/8. - _Amiram Eldar_, Dec 23 2021
%p A047613 A047613:=n->2*n-2-(I^(2*n)+I^(n*(n+1)))/2: seq(A047613(n), n=1..100); # _Wesley Ivan Hurt_, Jun 02 2016
%t A047613 Select[Range[120], MemberQ[{1, 2, 4, 5}, Mod[#, 8]] &] (* or *) LinearRecurrence[{1, 0, 0, 1, -1}, {1, 2, 4, 5, 9}, 60] (* _Bruno Berselli_, Jul 17 2012 *)
%o A047613 From _Bruno Berselli_, Jul 17 2012: (Start)
%o A047613 (Magma) [n: n in [1..120] | n mod 8 in [1,2,4,5]];
%o A047613 (Maxima) makelist(2*n-2-((-1)^n+%i^(n*(n+1)))/2,n,1,60);
%o A047613 (PARI) Vec((1+x+2*x^2+x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2))+O(x^60)) (End)
%Y A047613 Cf. A047461, A047617.
%K A047613 nonn,easy
%O A047613 1,2
%A A047613 _N. J. A. Sloane_