login
A362503
a(n) is the number of k such that n - A000045(k) is a square.
3
1, 3, 3, 2, 2, 3, 2, 1, 1, 3, 2, 1, 2, 1, 2, 0, 1, 4, 1, 1, 0, 2, 2, 0, 1, 2, 2, 1, 1, 1, 2, 0, 0, 1, 1, 1, 1, 3, 3, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 2, 3, 1, 1, 0, 1, 1, 1, 2, 0, 2, 0, 0, 1, 0, 2, 2, 1, 1, 0, 1, 2, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 2, 2, 1, 1, 1, 0, 0, 2, 1, 1, 0, 1, 1, 0, 0, 0, 2
OFFSET
0,2
COMMENTS
Number of ways to write n as the sum of a Fibonacci number and a square, where A000045(1) and A000045(2) are counted as separate.
LINKS
FORMULA
a(1 + A000045(6*k)^2/4) >= 4.
EXAMPLE
a(5) = 3 because 5 = A000045(1) + 2^2 = A000045(2) + 2^2 = A000045(5) + 0^2.
MAPLE
N:= 100: # to get terms <= N
V:= Array(0..N):
for i from 0 do
f:= combinat:-fibonacci(i);
if f >= N then break fi;
s:= floor(sqrt(N-f));
J:=[seq(f+i^2, i=0..s)];
V[J]:= V[J] +~ 1;
od:
convert(V, list);
PROG
(PARI) f(n) = my(k=1); while (fibonacci(k) <= n, k++); k; \\ A108852
a(n) = sum(k=0, f(n), issquare(n-fibonacci(k))); \\ Michel Marcus, Apr 23 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Apr 22 2023
STATUS
approved