Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #58 Sep 13 2021 10:05:51
%S 0,0,0,0,0,0,0,0,0,0,0,1,2,0,4,3,2,1,10,0,12,0,10,2,16,4,12,10,20,0,
%T 12,20,0,12,26,3,10,20,31,0,10,24,35,0,14,10,20,32,42,0,12,21,32,45,
%U 10,20,30,40,50,0,14,24,36,10,20,31,42,50,64,0,16,27,10
%N Let x run through the list of numbers with no zeros (A052382); replace each digit d of x by the digit (x mod d).
%C Graph of the sequence generates a fractal-like image.
%H Michel Marcus, <a href="/A346576/b346576.txt">Table of n, a(n) for n = 1..7380</a>
%H Rakesh Khanna A, <a href="/A346576/a346576.pdf">Graph of the sequence</a>
%e If x = 247 we get 132 as 247 mod 2 = 1, 247 mod 4 = 3, and 247 mod 7 = 2. As 247 is the 205th zeroless number, a(205) = 132.
%t f[n_] := FromDigits @ Mod[n, IntegerDigits[n]]; f /@ Select[Range[100], !MemberQ[IntegerDigits[#], 0] &] (* _Amiram Eldar_, Jul 26 2021 *)
%o (C)
%o #include <stdio.h>
%o #define START 1
%o #define END 1000
%o int main(){
%o unsigned int R,N,M,power_cntr;
%o int mod1,mod2;
%o for(N=START;N<=END;N++){
%o R=N;
%o M=0;
%o power_cntr=1;
%o while(R!=0){
%o mod1=R%10;
%o if(mod1==0) break;
%o mod2=N%mod1;
%o M+=mod2*power_cntr;
%o power_cntr*=10;
%o R=R/10;}
%o if(mod1!=0) printf("%u %u\n",N,M);}
%o return 0;}
%o (PARI) a(m) = my(d=digits(m)); fromdigits(Vec(apply(x->(m % x), d)));
%o apply(x->a(x), select(x->vecmin(digits(x)), [1..100])) \\ _Michel Marcus_, Jul 24 2021
%o (Python)
%o def f(k, digits): return int("".join(map(str, map(lambda x: k%x, digits))))
%o def aupton(terms):
%o alst, k = [], 1
%o while len(alst) < terms:
%o s = str(k)
%o if '0' not in s: alst.append(f(k, list(map(int, s))))
%o k += 1
%o return alst
%o print(aupton(73)) # _Michael S. Branicky_, Aug 22 2021
%Y Cf. A034838, A052382.
%Y See A347323 for another version.
%K nonn,base,look
%O 1,13
%A _Rakesh Khanna A_, Jul 24 2021