login
A283969
a(n) = n + 1 + Sum_{k=0..n} floor((n-k)/r), where r = (3+sqrt(5))/2.
4
1, 4, 10, 18, 29, 43, 59, 78, 99, 123, 150, 179, 211, 246, 283, 323, 365, 410, 458, 508, 561, 616, 674, 735, 798, 864, 933, 1004, 1078, 1154, 1233, 1315, 1399, 1486, 1576, 1668, 1763, 1860, 1960, 2063, 2168, 2276, 2386, 2499, 2615, 2733, 2854, 2978, 3104
OFFSET
0,2
COMMENTS
This is column 1 of the transposable interspersion A283938.
LINKS
FORMULA
a(n) = n + 1 + Sum_{k=0..n} floor((n-k)/r), where r = (3+sqrt(5))/2.
MATHEMATICA
r = GoldenRatio^2; z = 120;
s[0] = 1; s[n_] := s[n] = s[n - 1] + 1 + Floor[n*r];
Table[n + 1 + Sum[Floor[(n - k)/r], {k, 0, n}], {n, 0, z}] (* A283968 *)
Table[s[n], {n, 0, z}] (* A283969 *)
PROG
(PARI) a(n) = if(n<1, 1, a(n - 1) + 1 + floor(n*(3 + sqrt(5))/2));
for(n = 0, 50, print1(a(n), ", ")) \\ Indranil Ghosh, Mar 19 2017
(Python)
import math
from sympy import sqrt
def a(n):
return 1 if n<1 else a(n - 1) + 1 + int(math.floor(n*(3 + sqrt(5))/2))
print([a(n) for n in range(51)]) # Indranil Ghosh, Mar 19 2017
CROSSREFS
Partial sums of A026352.
Sequence in context: A009880 A197057 A025712 * A022781 A112557 A332490
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 18 2017
STATUS
approved