

A070864


a(1) = a(2) = 1; a(n) = 2 + a(n  a(n1)).


3



1, 1, 3, 3, 3, 5, 3, 5, 5, 5, 7, 5, 7, 5, 7, 7, 7, 9, 7, 9, 7, 9, 7, 9, 9, 9, 11, 9, 11, 9, 11, 9, 11, 9, 11, 11, 11, 13, 11, 13, 11, 13, 11, 13, 11, 13, 11, 13, 13, 13, 15, 13, 15, 13, 15, 13, 15, 13, 15, 13, 15, 13, 15, 15, 15, 17, 15, 17, 15, 17, 15, 17, 15, 17, 15, 17, 15, 17, 15
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


REFERENCES

S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 129.


LINKS

T. D. Noe, Table of n, a(n) for n = 1..1000
Nick Hobson, Python program for this sequence
Eric Weisstein's World of Mathematics, Wolfram Sequences
Index entries for Hofstadtertype sequences


FORMULA

Conjecture. Let a(1)=a(2)=1 and for n > 2 let k = floor(sqrt(n+1))1 and d=nk(k+2). Then, if (d is 0, 1, or 2) OR (d=0 mod 2), a(n)=2k+1; otherwise a(n)=2k+3. This has been verified for n <= 15000. Thus the asymptotic behavior appears to be a(n) ~ floor(sqrt(n+1)).  John W. Layman, May 21 2002
By induction, a(1)=a(2)=1, a(3)=a(4)=a(5)=3 and for k >= 3 we obtain the following formulas for the 2k1 consecutive values from a(k^22k+2) up to a(k^2+1): a(k^2+1) = a(k^2) = 2k1, if 1 <= i <= 2k3 then a(k^2i) = 2k2(1)^i, hence asymptotically a(n) ~ 2*sqrt(n).  Benoit Cloitre, Jul 28 2002
a(n) = 2*floor(n^(1/2)) + r where r is in {1,1}. More precisely, let g(n) = round(sqrt(n))  floor(sqrt(n+1)1/sqrt(n+1)); then for n >= 1 we get: a(2*n) = 2*floor(sqrt(2*n))  2*g(ceiling(n/2)) + 1 and something similar for a(2*n+1).  Benoit Cloitre, Mar 06 2009
a(n) = 2*floor(n^(1/2))  (1)^(n + ceiling(n^(1/2))) for n > 0.  Branko Curgus, Feb 10 2011


EXAMPLE

If k = 4, a(4^2+1) = a(17) = a(16) = 2*4  1 = 7, a(15) = 2*4  2  (1)^1 = 7, a(14) = 2*4  2  (1)^2 = 5, a(13)=7, a(12)=5, a(11)=7.


MATHEMATICA

a[1] = a[2] = 1; a[n_] := a[n] = 2 + a[n  a[n  1]]; Table[ a[n], {n, 1, 80}]


CROSSREFS

Cf. A010000.
Sequence in context: A132448 A132450 A132424 * A321790 A076566 A083574
Adjacent sequences: A070861 A070862 A070863 * A070865 A070866 A070867


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane, May 19 2002


EXTENSIONS

More terms from Jason Earls, May 19 2002


STATUS

approved



