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.

A047623 Numbers that are congruent to {1, 3, 5} mod 8.

This page as a plain text file.
%I A047623 #29 Jul 02 2025 16:55:29
%S A047623 1,3,5,9,11,13,17,19,21,25,27,29,33,35,37,41,43,45,49,51,53,57,59,61,
%T A047623 65,67,69,73,75,77,81,83,85,89,91,93,97,99,101,105,107,109,113,115,
%U A047623 117,121,123,125,129,131,133,137,139,141,145,147,149,153,155,157
%N A047623 Numbers that are congruent to {1, 3, 5} mod 8.
%C A047623 Numbers that can be expressed as the sum of at most three square numbers (see Tattersall). - _Stefano Spezia_, Jul 02 2025
%D A047623 James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 17.
%H A047623 Vincenzo Librandi, <a href="/A047623/b047623.txt">Table of n, a(n) for n = 1..5000</a>
%H A047623 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F A047623 a(n) = 2*floor((n-1)/3) + 2*n - 1. - _Gary Detlefs_, Mar 18 2010
%F A047623 From _Colin Barker_, Feb 03 2012: (Start)
%F A047623 G.f.: x*(1+2*x+2*x^2+3*x^3)/(1-x-x^3+x^4).
%F A047623 a(n) = a(n-1) + a(n-3) - a(n-4) for n>4. (End)
%F A047623 From _Wesley Ivan Hurt_, Jun 10 2016: (Start)
%F A047623 a(n) = (24*n-21-6*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9.
%F A047623 a(3k) = 8k-3, a(3k-1) = 8k-5, a(3k-2) = 8k-7. (End)
%p A047623 A047623:=n->(24*n-21-6*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047623(n), n=1..100); # _Wesley Ivan Hurt_, Jun 10 2016
%t A047623 Select[Range[0,150], MemberQ[{1,3,5}, Mod[#,8]]&] (* _Vincenzo Librandi_, Apr 27 2012 *)
%o A047623 (Magma) I:=[1, 3, 5, 9]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // _Vincenzo Librandi_, Apr 27 2012
%Y A047623 Cf. A047478, A047484, A047529.
%K A047623 nonn,easy
%O A047623 1,2
%A A047623 _N. J. A. Sloane_