The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A242667 Number of ways of representing n as the sum of one or more consecutive squarefree numbers. 3
 1, 1, 2, 0, 2, 2, 1, 1, 0, 2, 3, 0, 2, 2, 1, 1, 3, 1, 1, 0, 3, 1, 3, 2, 0, 1, 1, 2, 2, 1, 2, 1, 2, 4, 1, 1, 1, 2, 2, 1, 2, 3, 2, 1, 2, 2, 2, 1, 1, 0, 2, 1, 2, 0, 4, 0, 3, 2, 3, 0, 3, 2, 1, 1, 2, 3, 2, 0, 3, 3, 3, 3, 1, 1, 1, 1, 2, 3, 2, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Robert Israel, Table of n, a(n) for n = 1..10000 EXAMPLE a(6)=2 because n=6 itself is already a squarefree number (sum of 1 term), and 6 can in addition be written as A005117(1)+ A005117(2)+A005117(3), a sum of 3 consecutive squarefree numbers. MAPLE A242667 := proc(n) a := 0 ; for i from 1 do if A005117(i) > n then return a; end if; for k from i do su := add(A005117(s), s=i..k) ; if su = n then a := a+1 ; elif su > n then break; fi ; end do: end do: end proc: seq(A242667(n), n=1..80) ; # R. J. Mathar, Jun 12 2014 # Alternative: N:= 1000:# to get the first N entries A005117:= select(numtheory:-issqrfree, [\$1..N]): M:= nops(A005117); A:= Array(1..N): t0:= 0: for n from 1 to M-1 do t0:= t0 + A005117[n]; t:= t0; for i from 1 while t <= N do A[t] := A[t]+1; if n+i > M then break fi; t:= t + A005117[n+i]-A005117[i]; od; od: seq(A[i], i=1..N); # Robert Israel, Jun 25 2014 MATHEMATICA With[{N = 100}, (* to get the first N entries *) A005117 = Select[Range[N], SquareFreeQ]; M = Length[A005117]; A = Table[0, {N}]; t0 = 0; For[n = 1, n <= M-1, n++, t0 = t0+A005117[[n]]; t = t0; For[i = 1, t <= N, i++, A[[t]] = A[[t]]+1; If[n+i > M, Break[]]; t = t + A005117[[n+i]] - A005117[[i]]] ] ]; A (* Jean-François Alcover, Feb 07 2023, after Robert Israel *) CROSSREFS Cf. A005117. Sequence in context: A353322 A158950 A213013 * A059581 A344319 A236998 Adjacent sequences: A242664 A242665 A242666 * A242668 A242669 A242670 KEYWORD nonn AUTHOR Irina Gerasimova, May 20 2014 STATUS approved

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

Last modified December 9 03:28 EST 2023. Contains 367681 sequences. (Running on oeis4.)