OFFSET
1,5
COMMENTS
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
Sam Northshield, Three analogues of Stern's diatomic sequence, arXiv preprint arXiv:1503.03433 [math.CO], 2015; also, Proceedings of the 16th International Conference on Fibonacci Numbers and Their Applications, Rochester Institute of Technology, Rochester, New York, July 20-27, 2014.
Sam Northshield, Some generalizations of a formula of Reznick, SUNY Plattsburgh (2022).
FORMULA
a(2n) = a(n), a(2n+1) = a(n) + a(n+1) + (4a(n)*a(n+1)+1)^(1/2).
MATHEMATICA
nn = 100;
a[_] = 0; a[1] = 0; Do[a[n] = If[EvenQ[n], a[n/2], m = (n-1)/2; a[m] + a[m + 1] + Sqrt[1 + 4 a[m] a[m+1]] // Floor], {n, 2, nn}];
Array[a, nn] (* Jean-François Alcover, Sep 25 2018, from PARI *)
PROG
(PARI) lista(nn) = {va = vector(nn); va[1] = 0; for (n=2, nn, if (n % 2 == 0, va[n] = va[n/2], m = (n-1)/2; va[n] = va[m] + va[m+1] + sqrtint(1 + 4*va[m]*va[m+1])); ); va; } \\ Michel Marcus, May 03 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Barrentine, May 02 2016
STATUS
approved