login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Benoit Cloitre, 10 conjectures in additive number theory, arXiv:1101.4274 [math.NT], 2011.
Eric S. Rowland, A natural prime-generating recurrence, arXiv:0710.3217 [math.NT], 2007-2008.
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
Sequence in context: A066200 A357913 A053822 * A276652 A137404 A110643
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Oct 04 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 10 05:56 EDT 2024. Contains 375044 sequences. (Running on oeis4.)