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.

A277278 a(n) = smallest m for which there is a sequence n = b_1 < b_2 < ... < b_t = m such that b_1 + b_2 +...+ b_t is a perfect square.

This page as a plain text file.
%I A277278 #47 May 02 2017 22:17:18
%S A277278 0,1,4,6,4,10,10,9,14,9,14,13,13,18,18,18,16,19,22,23,23,27,27,26,25,
%T A277278 25,28,33,32,35,34,33,35,38,38,40,36,42,42,42,41,48,48,47,51,50,50,49,
%U A277278 52,49,57,57,59,59,58,58,63,63,63,62,61,66,66,67,64,73,73
%N A277278 a(n) = smallest m for which there is a sequence n = b_1 < b_2 < ... < b_t = m such that b_1 + b_2 +...+ b_t is a perfect square.
%C A277278 Sum analog of R. L. Graham's sequence (A006255).
%H A277278 Peter Kagey, <a href="/A277278/b277278.txt">Table of n, a(n) for n = 0..3000</a>
%F A277278 a(n^2) = n^2.
%e A277278 a(0) = 0  via 0                  = 0^2
%e A277278 a(1) = 1  via 1                  = 1^2
%e A277278 a(2) = 4  via 2 + 3 + 4          = 3^2
%e A277278 a(3) = 6  via 3 + 6              = 3^2
%e A277278 a(4) = 4  via 4                  = 2^2
%e A277278 a(5) = 10 via 5 + 6 + 7 + 8 + 10 = 6^2
%e A277278 a(6) = 10 via 6 + 10             = 4^2
%o A277278 (PARI) a(n)=if (issquare(n), return (n)); ok = 0; d = 1; while (!ok, for (j=1, 2^d-1, b = Vecrev(binary(j)); if (issquare(n+sum(k=1,#b, b[k]*(n+k))), ok = 1; break);); if (! ok, d++);); n+d; \\ _Michel Marcus_, Oct 16 2016
%o A277278 (Haskell)
%o A277278 import Data.List (find)
%o A277278 import Data.Maybe (fromJust)
%o A277278 isSquare m = m == (integerRoot * integerRoot) where
%o A277278 integerRoot = floor (sqrt (fromIntegral m)::Double)
%o A277278 a277278 n
%o A277278 | isSquare n = n
%o A277278 | otherwise = last $ fromJust $ find (isSquare . sum) s where
%o A277278 s = map ((n:) . map (n+)) a048793_tabf
%o A277278 -- _Peter Kagey_, Oct 19 2016
%Y A277278 Cf. A006255.
%K A277278 nonn
%O A277278 0,3
%A A277278 _Peter Kagey_, Oct 15 2016