cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A362503 a(n) is the number of k such that n - A000045(k) is a square.

This page as a plain text file.
%I A362503 #12 Apr 24 2023 01:37:04
%S A362503 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,
%T A362503 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,
%U A362503 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
%N A362503 a(n) is the number of k such that n - A000045(k) is a square.
%C A362503 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.
%H A362503 Robert Israel, <a href="/A362503/b362503.txt">Table of n, a(n) for n = 0..10000</a>
%F A362503 a(1 + A000045(6*k)^2/4) >= 4.
%e A362503 a(5) = 3 because 5 = A000045(1) + 2^2 = A000045(2) + 2^2 = A000045(5) + 0^2.
%p A362503 N:= 100: # to get terms <= N
%p A362503 V:= Array(0..N):
%p A362503 for i from 0 do
%p A362503   f:= combinat:-fibonacci(i);
%p A362503   if f >= N then break fi;
%p A362503   s:= floor(sqrt(N-f));
%p A362503   J:=[seq(f+i^2, i=0..s)];
%p A362503   V[J]:= V[J] +~ 1;
%p A362503 od:
%p A362503 convert(V,list);
%o A362503 (PARI) f(n) = my(k=1); while (fibonacci(k) <= n, k++); k; \\ A108852
%o A362503 a(n) = sum(k=0, f(n), issquare(n-fibonacci(k))); \\ _Michel Marcus_, Apr 23 2023
%Y A362503 Cf. A108852, A362409, A362434.
%K A362503 nonn
%O A362503 0,2
%A A362503 _Robert Israel_, Apr 22 2023