OFFSET
1,2
COMMENTS
Conjecture: if m is an integer and sqrt(m) is irrational, the sequence of n such that n^2 = (1/m)*(n + floor(sqrt(m)*n*floor(sqrt(m)*n))) always satisfies a recurrence of order m. For example: if m=6, the sequence n=b(k) satisfies: b(6k)=4*b(6k-1)+4*b(6k-2)-b(6k-3)-1; b(6k+1)=.... etc.
FORMULA
a(1)=1; a(2)=6; a(3)=23; a(4)=40; a(4n)=2*a(4n-1)-a(4n-2); a(4n+1)=7*a(4n)-a(4n-2)-1; a(4n+2)=7*a(4n+1)-a(4n-1)-1; a(4n+3)=4*a(4n+2)-a(4n+1)/2-1/2.
Empirical g.f.: x*(x^7+x^6+13*x^5+89*x^4-17*x^3-17*x^2-5*x-1) / ((x-1)*(x^2-4*x-1)*(x^2+4*x-1)*(x^4+18*x^2+1)). - Colin Barker, Jun 24 2013
PROG
(PARI) x=1; y=6; z=23; u=40; for(n=5, 50, v=if((n%4-1)*(n%4-2), if(n%4, 4*u-z/2-1/2, 2*u-z), if(n%4-1, 7*u-z-1, 7*u-y-1)); x=y; y=z; z=u; u=v; print1(v, ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 15 2003
STATUS
approved