Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A346576
Let x run through the list of numbers with no zeros (A052382); replace each digit d of x by the digit (x mod d).
4
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, 12, 20, 0, 12, 26, 3, 10, 20, 31, 0, 10, 24, 35, 0, 14, 10, 20, 32, 42, 0, 12, 21, 32, 45, 10, 20, 30, 40, 50, 0, 14, 24, 36, 10, 20, 31, 42, 50, 64, 0, 16, 27, 10
OFFSET
1,13
COMMENTS
Graph of the sequence generates a fractal-like image.
LINKS
EXAMPLE
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.
MATHEMATICA
f[n_] := FromDigits @ Mod[n, IntegerDigits[n]]; f /@ Select[Range[100], !MemberQ[IntegerDigits[#], 0] &] (* Amiram Eldar, Jul 26 2021 *)
PROG
(C)
#include <stdio.h>
#define START 1
#define END 1000
int main(){
unsigned int R, N, M, power_cntr;
int mod1, mod2;
for(N=START; N<=END; N++){
R=N;
M=0;
power_cntr=1;
while(R!=0){
mod1=R%10;
if(mod1==0) break;
mod2=N%mod1;
M+=mod2*power_cntr;
power_cntr*=10;
R=R/10; }
if(mod1!=0) printf("%u %u\n", N, M); }
return 0; }
(PARI) a(m) = my(d=digits(m)); fromdigits(Vec(apply(x->(m % x), d)));
apply(x->a(x), select(x->vecmin(digits(x)), [1..100])) \\ Michel Marcus, Jul 24 2021
(Python)
def f(k, digits): return int("".join(map(str, map(lambda x: k%x, digits))))
def aupton(terms):
alst, k = [], 1
while len(alst) < terms:
s = str(k)
if '0' not in s: alst.append(f(k, list(map(int, s))))
k += 1
return alst
print(aupton(73)) # Michael S. Branicky, Aug 22 2021
CROSSREFS
See A347323 for another version.
Sequence in context: A376252 A347323 A324471 * A122512 A128263 A241384
KEYWORD
nonn,base,look
AUTHOR
Rakesh Khanna A, Jul 24 2021
STATUS
approved