login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A034705 Numbers that are sums of consecutive squares. 27
0, 1, 4, 5, 9, 13, 14, 16, 25, 29, 30, 36, 41, 49, 50, 54, 55, 61, 64, 77, 81, 85, 86, 90, 91, 100, 110, 113, 121, 126, 135, 139, 140, 144, 145, 149, 169, 174, 181, 190, 194, 196, 199, 203, 204, 221, 225, 230, 245, 255, 256, 265, 271, 280, 284, 285, 289, 294, 302 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Also, differences of any pair of square pyramidal numbers (A000330). These could be called "truncated square pyramidal numbers". - Franklin T. Adams-Watters, Nov 29 2006

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

Index entries for sequences related to sums of squares

MATHEMATICA

nMax = 1000; t = {0}; Do[k = n; s = 0; While[s = s + k^2; s <= nMax, AppendTo[t, s]; k++], {n, Sqrt[nMax]}]; t = Union[t] (* T. D. Noe, Oct 23 2012 *)

PROG

(Haskell)

import Data.Set (deleteFindMin, union, fromList); import Data.List (inits)

a034705 n = a034705_list !! (n-1)

a034705_list = f 0 (tail $ inits $ a000290_list) (fromList [0]) where

   f x vss'@(vs:vss) s

     | y < x = y : f x vss' s'

     | otherwise = f w vss (union s $ fromList $ scanl1 (+) ws)

     where ws@(w:_) = reverse vs

           (y, s') = deleteFindMin s

-- Reinhard Zumkeller, May 12 2015

CROSSREFS

Cf. A000290, A000330, A034706.

Cf. A217843-A217850 (sums of consecutive powers 3 to 10).

Sequence in context: A060199 A229240 A322135 * A006844 A022425 A277549

Adjacent sequences:  A034702 A034703 A034704 * A034706 A034707 A034708

KEYWORD

nonn

AUTHOR

Erich Friedman

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 05:41 EDT 2020. Contains 336442 sequences. (Running on oeis4.)