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.
%I A231272 #22 Aug 13 2025 22:10:11 %S A231272 1,2,3,4,5,6,7,10,11,12,13,14,15,17,19,20,21,22,23,24,26,27,28,29,30, %T A231272 35,36,37,38,44,45,47,49,51,53,55,56,57,59,60,62,63,64,65,66,68,70,71, %U A231272 72,73,76,78,81,83,86,89,91,92,94,98,100,102,106,108,109,112 %N A231272 Numbers m with unique solution to m = +-1^2+-2^2+-3^2+-4^2+-...+-k^2 with minimal k giving at least one solution. %C A231272 Numbers m such that A231071(m) = 1. The value of k is given by A231015(m). %H A231272 Alois P. Heinz, <a href="/A231272/b231272.txt">Table of n, a(n) for n = 1..3000</a> %H A231272 Andrica, D., Vacaretu, D., <a href="http://www.cs.ubbcluj.ro/~studia-m/2006-4/andrica.pdf">Representation theorems and almost unimodal sequences</a>, Studia Univ. Babes-Bolyai, Mathematica, Vol. LI, 4 (2006), 23-33. %e A231272 10 is member of the sequence with unique minimal solution 10 = -1+4-9+16. %e A231272 A000330(k) = k(k+1)(2k+1)/6 = 1^2 + 2^2 + ... + k^2 is a member for k > 0. - _Jonathan Sondow_, Nov 06 2013 %p A231272 b:= proc(n, i) option remember; local m, t; m:= (1+(3+2*i)*i)*i/6; %p A231272 if n>m then 0 elif n=m then 1 else %p A231272 t:= b(abs(n-i^2), i-1); %p A231272 if t>1 then return 2 fi; %p A231272 t:= t+b(n+i^2, i-1); `if`(t>1, 2, t) %p A231272 fi %p A231272 end: %p A231272 a:= proc(n) option remember; local m, k; %p A231272 for m from 1+ `if`(n=1, -1, a(n-1)) do %p A231272 for k while b(m, k)=0 do od; %p A231272 if b(m, k)=1 then return m fi %p A231272 od %p A231272 end: %p A231272 seq(a(n), n=1..80); %t A231272 b[n_, i_] := b[n, i] = Module[{m, t}, m = (1 + (3 + 2*i)*i)*i/6; If[n > m, 0, If[n == m, 1, t = b[Abs[n - i^2], i - 1]; If[t > 1, Return[2]]; t = t + b[n + i^2, i - 1]; If[t > 1, 2, t]]]]; %t A231272 a[n_] := a[n] = Module[{m, k}, For[m = 1 + If[n == 1, -1, a[n - 1]], True, m++, For[k = 1, b[m, k] == 0, k++]; If[b[m, k] == 1, Return[m]]]]; %t A231272 Table[a[n], {n, 1, 80}] (* _Jean-François Alcover_, Sep 01 2022, after _Alois P. Heinz_ *) %Y A231272 Cf. A000330, A231015, A231071, A231016 (complement). %K A231272 nonn %O A231272 1,2 %A A231272 _Alois P. Heinz_, Nov 06 2013