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.

Original entry on oeis.org

1, 3, 5, 9, 11, 13, 17, 19, 21, 25, 27, 29, 33, 35, 37, 41, 43, 45, 49, 51, 53, 57, 59, 61, 65, 67, 69, 73, 75, 77, 81, 83, 85, 89, 91, 93, 97, 99, 101, 105, 107, 109, 113, 115, 117, 121, 123, 125, 129, 131, 133, 137, 139, 141, 145, 147, 149, 153, 155, 157
Offset: 1

Views

Author

Keywords

Comments

Numbers that can be expressed as the sum of at most three square numbers (see Tattersall). - Stefano Spezia, Jul 02 2025

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 17.

Crossrefs

Programs

  • 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
  • Maple
    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
  • Mathematica
    Select[Range[0,150], MemberQ[{1,3,5}, Mod[#,8]]&] (* Vincenzo Librandi, Apr 27 2012 *)

Formula

a(n) = 2*floor((n-1)/3) + 2*n - 1. - Gary Detlefs, Mar 18 2010
From Colin Barker, Feb 03 2012: (Start)
G.f.: x*(1+2*x+2*x^2+3*x^3)/(1-x-x^3+x^4).
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4. (End)
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = (24*n-21-6*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 8k-3, a(3k-1) = 8k-5, a(3k-2) = 8k-7. (End)