%I #12 Sep 21 2017 03:23:28
%S 1,2,4,7,12,21,37,64,111,193,335,581,1007,1745,3023,5236,9069,15708,
%T 27207,47124,81622,141374,244867,424122,734601,1272367,2203805,
%U 3817103,6611417,11451311,19834253,34353934,59502759,103061802,178508278,309185407,535524834
%N A Graham-Pollak-like sequence with multiplier 3 instead of 2.
%C When the multiplier in the recurrence is 2, we have the Graham-Pollak sequence, where there is a remarkable exact explicit formula for a(n) in terms of the union of the set of integers and the set of integer multiples of Sqrt(2). As Weisstein summarizes Borwein & Bailey: "It is not known if sequences such as a(n) = Floor(Sqrt(3*a(n-1)*(a(n-1)+1))) have corresponding properties." This sequence is the given one, with a(0) = 1. Through n=40, the primes are when n = 1, 3, 6, 9, 14, 25, 28, 29. Through n=40, the semiprimes are when n = 2, 5, 8, 10, 11, 12, 13, 16, 21, 22, 26, 27, 30, 31, 38.
%D Borwein, J. and Bailey, D., Mathematics by Experiment: Plausible Reasoning in the 21st Century. Natick, MA: A. K. Peters, 2003.
%H R. L. Graham and H. O. Pollak, <a href="http://www.jstor.org/stable/2688390">Note on a nonlinear recurrence related to sqrt(2)</a>, Mathematics Magazine, Volume 43, Pages 143-145, 1970. Zbl 201.04705.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Graham-PollakSequence.html">Graham-Pollak sequence</a>
%F a(0) = 1, a(n) = Floor(Sqrt(3*a(n-1)*(a(n-1)+1))).
%e a(9) = 193 because a(8) = 111; so a(9) = Floor(Sqrt(3*111*(111+1))) = floor(sqrt(37296)) = 193, which happens to be prime.
%t RecurrenceTable[{a[0]==1,a[n]==Floor[Sqrt[3a[n-1](a[n-1]+1)]]},a[n],{n,40}] (* _Harvey P. Dale_, Sep 10 2011 *)
%Y Cf. A001521, A091522, A091523.
%K nonn
%O 0,2
%A _Jonathan Vos Post_, Dec 06 2004
%E Corrected and extended by _Harvey P. Dale_, Sep 10 2011