

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



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

a := 0 ;
for i from 1 do
return a;
end if;
for k from i do
if su = n then
a := a+1 ;
elif su > n then
break;
fi ;
end do:
end do:
end proc:
# Alternative:
N:= 1000:# to get the first N entries
A005117:= select(numtheory:issqrfree, [$1..N]):
A:= Array(1..N):
t0:= 0:
for n from 1 to M1 do
t:= t0;
for i from 1 while t <= N do
A[t] := A[t]+1;
if n+i > M then break fi;
od;
od:


MATHEMATICA

With[{N = 100}, (* to get the first N entries *)
A005117 = Select[Range[N], SquareFreeQ];
A = Table[0, {N}];
t0 = 0;
For[n = 1, n <= M1, n++,
t = t0;
For[i = 1, t <= N, i++,
A[[t]] = A[[t]]+1;
If[n+i > M, Break[]];
]
];


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



