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.

A348192 a(0) = 0; for n >= 1, a(n) = 1 + a(n - GCD(n, digital sum(n))).

This page as a plain text file.
%I A348192 #41 Jun 02 2025 15:24:38
%S A348192 0,1,1,1,1,1,1,1,1,1,2,3,2,3,4,3,4,5,2,3,3,3,4,5,3,4,4,3,5,6,4,5,6,5,
%T A348192 6,7,4,5,6,5,5,6,5,6,6,5,7,8,5,6,6,6,7,8,6,7,8,7,8,9,7,8,8,7,9,10,8,9,
%U A348192 9,9,8,9,8,9,10,9,10,9,10,11,9,9,10,11,9,10,10,10,10,11,10,11,12,11,12,13,12,13
%N A348192 a(0) = 0; for n >= 1, a(n) = 1 + a(n - GCD(n, digital sum(n))).
%C A348192 Number of steps needed to reach zero when starting from k = n and repeatedly applying the map that replaces k by k - A066750(k).
%F A348192 a(0) = 0; for n >= 1, a(n) = 1 + a(n - A066750(n)).
%e A348192 n = 12, a(12) = 1 + a(12 - GCD(12,3)) = 1 + a(9) = 1 + 1 + a(9 - GCD(9,9)) = 2 + a(0) = 2.
%t A348192 a[0] = 0; a[n_] := a[n] = 1 + a[n - GCD[n, Plus @@ IntegerDigits[n]]]; Array[a, 100, 0] (* _Amiram Eldar_, Jan 25 2022 *)
%o A348192 (Python)
%o A348192 from itertools import count, islice
%o A348192 from math import gcd
%o A348192 def A348192_gen(): # generator of terms
%o A348192     blist = [0]
%o A348192     yield 0
%o A348192     for n in count(1):
%o A348192         blist.append(1+blist[n-gcd(n,sum(int(d) for d in str(n)))])
%o A348192         yield blist[-1]
%o A348192 A348192_list = list(islice(A348192_gen(),30)) # _Chai Wah Wu_, Jan 26 2022
%Y A348192 Cf. A007953, A066750.
%K A348192 nonn,base
%O A348192 0,11
%A A348192 _Ctibor O. Zizka_, Jan 25 2022