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.

A112687 Numbers n that cannot be decomposed into the sum of at most 4 square numbers when using the following algorithm: Repeat the following 2 steps 4 times: 1-find the largest square s smaller than n; 2-n=n-s Numbers that can be decomposed yield final values of n=0. The sequence presented is of those numbers where n is not 0 when this algorithm ends.

This page as a plain text file.
%I A112687 #38 Feb 16 2025 08:32:59
%S A112687 23,32,43,48,56,61,71,76,79,88,93,96,107,112,115,119,128,133,136,140,
%T A112687 143,151,156,159,163,166,167,176,181,184,188,191,192,203,208,211,215,
%U A112687 218,219,224,232,237,240,244,247,248,253,263,268,271,275,278,279,284
%N A112687 Numbers n that cannot be decomposed into the sum of at most 4 square numbers when using the following algorithm: Repeat the following 2 steps 4 times: 1-find the largest square s smaller than n; 2-n=n-s Numbers that can be decomposed yield final values of n=0. The sequence presented is of those numbers where n is not 0 when this algorithm ends.
%C A112687 Found while writing a program to decompose integers as sums of four square numbers (following Lagrange's Four-Square Theorem).
%C A112687 Question: does the sum of the reciprocals of the numbers in this sequence converge? - _J. Lowell_, May 03 2014
%C A112687 Answer: this series is divergent. - _Thomas Ordowski_, May 22 2016
%C A112687 Numbers n such that A053610(n) > 4. - _Thomas Ordowski_, May 22 2016
%H A112687 Enrique Pérez Herrero, <a href="/A112687/b112687.txt">Table of n, a(n) for n = 1..10000</a>
%H A112687 E. J. Ionascu, <a href="http://arxiv.org/abs/1209.0147">Equilateral triangles in Z^4</a>, arXiv:1209.0147 [math.NT], 2012-2013.
%H A112687 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LagrangesFour-SquareTheorem.html">Lagrange's Four-Square Theorem</a>
%H A112687 Wikipedia, <a href="http://en.wikipedia.org/wiki/Lagrange&#39;s_four-square_theorem">Lagrange's Four-Square Theorem</a>
%e A112687 23 is the first number that cannot be decomposed because 16+4+1+1 falls short by one.
%t A112687 f1[x_]:=Floor[Sqrt[x]];
%t A112687 f2[x_]:=Floor[Sqrt[x-f1[x]^2]];
%t A112687 f3[x_]:=Floor[Sqrt[x-f1[x]^2-f2[x]^2]];
%t A112687 f4[x_]:=Floor[Sqrt[x-f1[x]^2-f2[x]^2-f3[x]^2]];
%t A112687 Err[n_]:=n-(f1[n]^2+f2[n]^2+f3[n]^2+f4[n]^2);
%t A112687 Select[Table[n,{n,0,5000}],Err[#]!=0&] (* _Enrique Pérez Herrero_, Dec 19 2013 *)
%o A112687 (MATLAB) for n=1:312 a=n; i=1; while(i<5 & n~=0) j=1; while(j*j<=n) j=j+1; end; n=n-(j-1)*(j-1); i=i+1; end; if(n~=0) disp(a); end; end; % Luis F.B.A. Alexandre (lfbaa(AT)di.ubi.pt), Feb 08 2010
%K A112687 nonn
%O A112687 1,1
%A A112687 Luis F.B.A. Alexandre (lfbaa(AT)di.ubi.pt), Dec 31 2005
%E A112687 Included terms where the final value of n is larger than 1. The fact that some terms might be missing was noted by _Alonso del Arte_ on 2010-02-07. Luis F.B.A. Alexandre (lfbaa(AT)di.ubi.pt), Feb 08 2010