|
|
A120868
|
|
a(n) is the number k for which there exists a unique pair (j,k) of positive integers such that (j + k + 1)^2 - 4*k = 5*n^2.
|
|
0
|
|
|
1, 4, 1, 5, 11, 4, 11, 1, 9, 19, 5, 16, 29, 11, 25, 4, 19, 36, 11, 29, 1, 20, 41, 9, 31, 55, 19, 44, 5, 31, 59, 16, 45, 76, 29, 61, 11, 44, 79, 25, 61, 4, 41, 80, 19, 59, 101, 36, 79, 11, 55, 101, 29, 76, 1, 49, 99, 20, 71, 124, 41, 95, 9, 64, 121, 31, 89, 149, 55, 116, 19, 81, 145
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The j's that match these k's comprise A005752.
|
|
LINKS
|
|
|
FORMULA
|
Let r = (1/2)*sqrt(5). If n is odd, then a(n) = ([n*r+1/2] + 1/2)^2 - (5/4)*n^2; if n is even, then a(n) = (1 + [n*r])^2 - (5/4)*n^2, where [ ] is the floor function.
|
|
EXAMPLE
|
1 = ([r+1/2] + 1/2)^2 - (5/4)*1^2,
4 =(1+[2*r])^2 - (5/4)*2^2,
1 = ([3*r+1/2] + 1/2)^2 - (5/4)*3^2, etc.
Moreover,
for n = 1, the unique (j,k) is (1,1): (1 + 1 + 1)^2 - 4*1 = 5*1;
for n = 2, the unique (j,k) is (1,4): (1 + 4 + 1)^2 - 4*4 = 5*4;
for n = 3, the unique (j,k) is (5,1): (5 + 1 + 1)^2 - 4*1 = 5*9.
|
|
MATHEMATICA
|
r = Sqrt[5]/2; Table[If[OddQ@ n, (Floor[n r + 1/2] + 1/2)^2 - (5/4) n^2, (1 + Floor[n r])^2 - (5/4) n^2], {n, 73}] (* Michael De Vlieger, Mar 06 2016 *)
|
|
PROG
|
(PARI) a(n) = my(fnt = floor(n*(sqrt(5)+1)/2)); fnt^2 + (2-n)*fnt - n^2 - n + 1; \\ Michel Marcus, Mar 05 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|