cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A378513 a(1) = 1, a(n) = a(n-1) + n if all the digits of a(n-1) do not share a divisor greater than 1. Otherwise, a(n) = a(n-1) divided by the gcd of all its individual digits.

This page as a plain text file.
%I A378513 #15 Dec 17 2024 13:02:02
%S A378513 1,3,1,5,1,7,1,9,1,11,22,11,24,12,27,43,60,10,29,49,70,10,33,11,36,12,
%T A378513 39,13,42,21,52,84,21,55,11,47,84,21,60,10,51,93,31,75,120,166,213,
%U A378513 261,310,360,120,172,225,279,334,390,130,188,247,307,368,430
%N A378513 a(1) = 1, a(n) = a(n-1) + n if all the digits of a(n-1) do not share a divisor greater than 1. Otherwise, a(n) = a(n-1) divided by the gcd of all its individual digits.
%C A378513 It can be shown that this sequence will grow indefinitely: Once it has reached a given number of digits in length, it cannot drop below that number of digits. Regardless of the number of times the number is reduced by dividing by GCDs, n will inevitably be great enough to increase a(n) to a larger and larger number of digits in length.
%H A378513 Paolo Xausa, <a href="/A378513/b378513.txt">Table of n, a(n) for n = 1..10000</a>
%e A378513 a(37) = 47 + 37, because the digits of 47 do not share a factor greater than 1.
%e A378513 a(38) = 84 / 4 = 21, because the gcd of 8 and 4 is 4.
%p A378513 a:= proc(n) option remember; `if`(n=1, 1, (t-> (g->
%p A378513       `if`(g=1, t+n, t/g))(igcd(convert(t, base, 10)[])))(a(n-1)))
%p A378513     end:
%p A378513 seq(a(n), n=1..62);  # _Alois P. Heinz_, Nov 29 2024
%t A378513 Module[{n = 1, g}, NestList[If[n++; (g = GCD @@ IntegerDigits[#]) == 1, # + n, #/g] &, 1, 100]] (* _Paolo Xausa_, Dec 16 2024 *)
%o A378513 (PARI) lista(nn) = my(v=vector(nn)); v[1] = 1; for (n=2, nn, my(g=gcd(digits(v[n-1]))); if (g == 1, v[n] = v[n-1]+n, v[n] = v[n-1]/g);); v; \\ _Michel Marcus_, Dec 09 2024
%Y A378513 Cf. A052423 (gcd of digits).
%K A378513 nonn,base,look
%O A378513 1,2
%A A378513 _Stuart Coe_, Nov 29 2024