The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A364918 a(1) = 1; for n >= 2, a(n) = a(n - GCD(n - 1, a(n - 1))) + GCD(n, a(n - 1)). 2
1, 2, 2, 4, 2, 4, 3, 4, 3, 4, 4, 8, 4, 6, 7, 8, 4, 6, 5, 10, 5, 6, 6, 12, 5, 6, 8, 12, 6, 12, 6, 8, 6, 8, 7, 7, 8, 10, 9, 9, 10, 12, 9, 10, 14, 16, 15, 18, 10, 20, 11, 12, 11, 12, 11, 15, 18, 13, 14, 16, 19, 20, 20, 24, 19, 20, 20, 24, 22, 24, 23, 24, 11, 12, 14, 16, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(1) = 1.
a(2) = a(2 - gcd(1, a(1))) + gcd(2, a(1)) = a(1) + 1 = 2.
a(3) = a(3 - gcd(2, a(2))) + gcd(3, a(2)) = a(1) + 1 = 2.
a(4) = a(4 - gcd(3, a(3))) + gcd(4, a(3)) = a(3) + 2 = 4.
and so on.
MATHEMATICA
a[1] = 1; a[n_] := a[n] = a[n - GCD[n - 1, a[n - 1]]] + GCD[n, a[n - 1]]; Array[a, 100]
PROG
(PARI) { for (n = 1, #a = vectorsmall(77), print1 (a[n] = if (n==1, 1, a[n - gcd(n - 1, a[n - 1])] + gcd(n, a[n - 1]))", "); ); } \\ Rémy Sigrist, Feb 06 2024
CROSSREFS
Sequence in context: A357531 A318476 A226083 * A182730 A330631 A214560
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Feb 06 2024
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 June 6 18:20 EDT 2024. Contains 373134 sequences. (Running on oeis4.)