login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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