|
|
A262922
|
|
a(1)=1; for n>1, a(n) = a(n-1) + n + 2 if a(n-1) and n are coprime, otherwise a(n) = a(n-1)/gcd(a(n-1),n).
|
|
2
|
|
|
1, 5, 10, 5, 1, 9, 18, 9, 1, 13, 26, 13, 1, 17, 34, 17, 1, 21, 42, 21, 1, 25, 50, 25, 1, 29, 58, 29, 1, 33, 66, 33, 1, 37, 74, 37, 1, 41, 82, 41, 1, 45, 90, 45, 1, 49, 98, 49, 1, 53, 106, 53, 1, 57, 114, 57, 1, 61, 122, 61, 1, 65, 130, 65, 1, 69, 138, 69, 1, 73, 146, 73, 1, 77, 154, 77, 1, 81, 162
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
This recurrence is quasi-periodic.
For some choice of starting value a(1) there exists an integer t>=1 such that a(4*t-3)=1, a(4*t-2)=4*t+1, a(4*t-1)=2*(4*t+1), a(4*t)=4*t+1. The loop is (1,x,2x,x).
For some choice of starting value a(1) there exists an integer t>=1 such that a(2*t)=2*t-1 and a(2*t-1)=2*(2*t-1). The loop is (x,2x). See also A133058.
Quasi-periodic sequences exist only for R=0,1,2 or 3 in a(n) = a(n-1) + n + R. For R=0,1,2 all starting values give a quasi-periodic sequence. The respective loop is (1,x) for R=0, (1,x,2x,2) for R=1, (1,x,2x,x) or (x,2x) for R=2. For R=3 only some starting values converge to a 6-loop (4x+2,2x+1,3x+6,x+2,2x+9,3x+17). Conjecture: For R>=4 the recurrence is not quasi-periodic.
|
|
LINKS
|
|
|
FORMULA
|
Maple suggests the rational o.g.f. (-x^6 - x^5 - x^3 + 6x^2 + 4x + 1)/((x + 1)(x - 1)^2(x^2 + 1)^2), which should be easy to check. - _Pater Bala_, Oct 04 2015
|
|
MATHEMATICA
|
a[1] = 1; a[n_] := a[n] = If[CoprimeQ[a[n - 1], n], a[n - 1] + n + 2, a[n - 1]/GCD[a[n - 1], n]]; Array[a, {79}] (* Michael De Vlieger, Oct 05 2015 *)
|
|
PROG
|
(PARI) A=vector(1000, i, 1); for(n=2, #A, A[n]=if(gcd(A[n-1], n)>1, A[n-1]/gcd(A[n-1], n), A[n-1]+n+2))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|