The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A334840 a(1) = 1, a(n) = a(n-1)/gcd(a(n-1),n) if this gcd is > 1, else a(n) = 4*a(n-1). 0
 1, 4, 16, 4, 16, 8, 32, 4, 16, 8, 32, 8, 32, 16, 64, 4, 16, 8, 32, 8, 32, 16, 64, 8, 32, 16, 64, 16, 64, 32, 128, 4, 16, 8, 32, 8, 32, 16, 64, 8, 32, 16, 64, 16, 64, 32, 128, 8, 32, 16, 64, 16, 64, 32, 128, 16, 64, 32, 128, 32, 128, 64, 256, 4, 16 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS A variant of A133058. The graph of [n, log a(n)] looks like the graph for [n, digitsum(n, base=2)]. This corresponds to the fact, that a(n) = 2^k for all n >= 1. Graph of partial sum [n, Sum_{i=1..n} (a(i))] and also graph of [n, Sum_{i=1..n} (a(i)) / n] looks like Takagi curve. LINKS EXAMPLE a(2) = 4*a(1) = 4, a(3) = 4*a(2) = 16, a(4) = a(3)/4 = 4, a(5) = 4*a(4) = 16, ... MATHEMATICA a[1] = 1; a[n_] := a[n] = If[(g = GCD[a[n-1], n]) > 1, a[n-1]/g, 4*a[n-1]]; Array[a, 100] (* Amiram Eldar, May 13 2020 *) PROG (MAGMA) a:=[1]; for n in [2..70] do if Gcd(a[n-1], n) eq 1 then Append(~a, 4* a[n-1]); else Append(~a, a[n-1] div Gcd(a[n-1], n)); end if; end for; a; // Marius A. Burtea, May 13 2020 (PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, my(g = gcd(va[n-1], n)); if (g > 1, va[n] = va[n-1]/g, va[n] = 4*va[n-1]); ); va; } \\ Michel Marcus, May 17 2020 CROSSREFS Cf. A000120, A133058, A255140, A257806, A319018. Sequence in context: A065659 A305833 A110650 * A232515 A010295 A059152 Adjacent sequences:  A334837 A334838 A334839 * A334841 A334842 A334843 KEYWORD nonn AUTHOR Ctibor O. Zizka, May 13 2020 STATUS approved

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

Last modified August 2 13:35 EDT 2021. Contains 346424 sequences. (Running on oeis4.)