OFFSET
1,1
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..500
FORMULA
a(n) = 3^(2*n-1) - floor(sqrt(3^(2*n-1)))^2
EXAMPLE
a(1)=3^1-1^2=2, a(2)=3^3-5^2=27-25=2, a(3)=3^5-15^2=243-225=18
MATHEMATICA
#-Floor[Sqrt[#]]^2&/@(3^Range[1, 61, 2]) (* Harvey P. Dale, Nov 01 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Nov 27 2011
STATUS
approved