login
a(n) = 8*n^2 - floor(n*sqrt(8))^2.
1

%I #11 Oct 19 2024 16:17:18

%S 4,7,8,7,4,32,31,28,23,16,7,63,56,47,36,23,8,92,79,64,47,28,7,119,100,

%T 79,56,31,4,144,119,92,63,32,196,167,136,103,68,31,223,188,151,112,71,

%U 28,248,207,164,119,72,23,271,224,175,124,71,16,292,239,184,127,68,7

%N a(n) = 8*n^2 - floor(n*sqrt(8))^2.

%H Charles R Greathouse IV, <a href="/A121488/b121488.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 8*n^2 - floor(n*sqrt(8))^2.

%e a(2) = 8*2^2-floor(2*sqrt(8))^2 = 32-25 = 7.

%p A121488:=n->8*n^2-floor(n*sqrt(8))^2: seq(A121488(n), n=1..100); # _Wesley Ivan Hurt_, Feb 15 2017

%t Table[8n^2-Floor[n*Sqrt[8]]^2,{n,64}] (* _James C. McMahon_, Oct 19 2024 *)

%o (PARI) a(n) = 8*n^2 - sqrtint(8*n^2)^2 \\ _Charles R Greathouse IV_, Feb 15 2017

%K nonn,easy

%O 1,1

%A _Clark Kimberling_, Aug 02 2006