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.

A362409 a(n) is the least number that is the sum of a Fibonacci number and a square in exactly n ways.

This page as a plain text file.
%I A362409 #16 May 01 2023 09:30:25
%S A362409 15,7,3,1,17
%N A362409 a(n) is the least number that is the sum of a Fibonacci number and a square in exactly n ways.
%C A362409 a(n) is the least k such that there are n pairs (i,j) of nonnegative integers such that A000045(i) + j^2 = k.
%C A362409 We count A000045(1) and A000045(2) separately, even though both are 1.
%C A362409 a(5) > 10^20, if it exists. - _Martin Ehrenstein_, May 01 2023
%e A362409 a(0) = 15 because 15 is not the sum of a Fibonacci number and a square.
%e A362409 a(1) = 7 because 7 = A000045(4) + 2^2 is the sum of a Fibonacci number and a square in one way.
%e A362409 a(2) = 3 because 3 = A000045(3) + 1^2 = A000045(4) + 0^2.
%e A362409 a(3) = 1 because 1 = A000045(0) + 1^2 = A000045(1) + 0^2 = A000045(2) + 0^2.
%e A362409 a(4) = 17 because 17 = A000045(1) + 4^2 = A000045(2) + 4^2 = A000045(6) + 3^2 = A000045(7) + 2^2.
%p A362409 N:= 10^8: # to get terms <= N
%p A362409 V:= Array(0..N):
%p A362409 for i from 0 do
%p A362409   f:= combinat:-fibonacci(i);
%p A362409   if f >= N then break fi;
%p A362409   s:= floor(sqrt(N-f));
%p A362409   J:=[seq(f+i^2,i=0..s)];
%p A362409   V[J]:= V[J] +~ 1;
%p A362409 od:
%p A362409 W:= Array(0..max(V)):
%p A362409 for i from 1 to N do
%p A362409   w:= V[i];
%p A362409   if W[w] = 0 then W[w]:= i fi
%p A362409 od:
%p A362409 convert(W,list);
%Y A362409 Cf. A000045, A362434, A362503.
%K A362409 nonn,more
%O A362409 0,1
%A A362409 _Robert Israel_, Apr 21 2023