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.

A174398 Numbers that are congruent to {1, 4, 5, 8} mod 12.

This page as a plain text file.
%I A174398 #26 Sep 08 2022 08:45:51
%S A174398 1,4,5,8,13,16,17,20,25,28,29,32,37,40,41,44,49,52,53,56,61,64,65,68,
%T A174398 73,76,77,80,85,88,89,92,97,100,101,104,109,112,113,116,121,124,125,
%U A174398 128,133,136,137,140,145,148,149,152,157,160,161,164,169,172,173
%N A174398 Numbers that are congruent to {1, 4, 5, 8} mod 12.
%C A174398 Numbers k such that k*(k + 3)/4 + (k + 1)*(k + 2)/6 or k*(5*k + 3)/12 + 1/3 is a nonnegative integer. - _Bruno Berselli_, Feb 14 2017
%H A174398 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1).
%F A174398 a(n) = 3*n - 3 + (-1)^floor((n-1)/2).
%F A174398 From _Wesley Ivan Hurt_, Jun 07 2016: (Start)
%F A174398 G.f.: x*(1 + 2*x - x^2 + 4*x^3)/((1 - x)^2*(1 + x^2)).
%F A174398 a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
%F A174398 a(n) = (1 + i)*(3*(n - n*i + i - 1) + i^(1-n) - i^n)/2, where i=sqrt(-1).
%F A174398 a(2*k) = A092259(k), a(2*k-1) = A087445(k). (End)
%F A174398 Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/6 + log(2)/2. - _Amiram Eldar_, Dec 31 2021
%p A174398 seq(3*n +(-1)^floor(n/2), n=0..50);
%t A174398 Table[(1+I)*(3*(n-n*I+I-1)+I^(1-n)-I^n)/2, {n, 60}] (* _Wesley Ivan Hurt_, Jun 07 2016 *)
%t A174398 Select[Range[200],MemberQ[{1,4,5,8},Mod[#,12]]&] (* or *) LinearRecurrence[ {2,-2,2,-1},{1,4,5,8},60] (* _Harvey P. Dale_, Aug 02 2020 *)
%o A174398 (Magma) [n : n in [0..200] | n mod 12 in [1, 4, 5, 8]]; // _Wesley Ivan Hurt_, Jun 07 2016
%Y A174398 Cf. A087445, A092259.
%K A174398 nonn,easy
%O A174398 1,2
%A A174398 _Gary Detlefs_, Mar 18 2010