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.

A047466 Numbers that are congruent to {0, 1, 2, 4} mod 8.

This page as a plain text file.
%I A047466 #24 Sep 08 2022 08:44:57
%S A047466 0,1,2,4,8,9,10,12,16,17,18,20,24,25,26,28,32,33,34,36,40,41,42,44,48,
%T A047466 49,50,52,56,57,58,60,64,65,66,68,72,73,74,76,80,81,82,84,88,89,90,92,
%U A047466 96,97,98,100,104,105,106,108,112,113,114,116,120,121,122
%N A047466 Numbers that are congruent to {0, 1, 2, 4} mod 8.
%H A047466 Bruno Berselli, <a href="/A047466/b047466.txt">Table of n, a(n) for n = 1..1000</a>
%H A047466 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F A047466 G.f.: x^2*(1+x+2*x^2+4*x^3) / ( (1+x)*(1+x^2)*(1-x)^2 ). - _R. J. Mathar_, Oct 08 2011
%F A047466 a(n) = 2*n-4+(3-(-1)^n)*(1-i^(n*(n+1)))/4, where i=sqrt(-1). - _Bruno Berselli_, Jul 18 2012
%F A047466 From _Wesley Ivan Hurt_, Jun 01 2016: (Start)
%F A047466 a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
%F A047466 a(2k) = A047461(k), a(2k-1) = A047467(k). (End)
%F A047466 Sum_{n>=2} (-1)^n/a(n) = (1+2*sqrt(2))*Pi/32 + (3+sqrt(2))*log(2)/16 - sqrt(2)*log(2-sqrt(2))/8. - _Amiram Eldar_, Dec 20 2021
%p A047466 A047466:=n->2*n-4+(3-I^(2*n))*(1-I^(n*(n+1)))/4: seq(A047466(n), n=1..100); # _Wesley Ivan Hurt_, Jun 01 2016
%t A047466 Select[Range[0,120], MemberQ[{0, 1, 2, 4}, Mod[#, 8]] &] (* or *) LinearRecurrence[{1, 0, 0, 1, -1}, {0, 1, 2, 4, 8}, 60] (* _Bruno Berselli_, Jul 18 2012 *)
%o A047466 Contribution from _Bruno Berselli_, Jul 18 2012: (Start)
%o A047466 (Magma) [n: n in [0..120] | n mod 8 in [0,1,2,4]];
%o A047466 (Maxima) makelist(2*n-4+(3-(-1)^n)*(1-%i^(n*(n+1)))/4,n,1,60);
%o A047466 (PARI) concat(0, Vec((1+x+2*x^2+4*x^3)/((1+x)*(1+x^2)*(1-x)^2)+O(x^60))) (End)
%Y A047466 Essentially the same as A003485.
%Y A047466 Cf. A047461, A047467.
%K A047466 nonn,easy
%O A047466 1,3
%A A047466 _N. J. A. Sloane_