OFFSET
1,3
COMMENTS
All numbers satisfying such conditions must be smaller than 10^9, because if we take any 10-digit number m, 10m is an 11-digit number while d||d||...||d is a 10-digit number.
148 and 148148 are the only numbers in the sequence for which d is not necessarily the last digit (for 148 we take d=4, which is the second digit of 148 and for 148148 we take d=8, which is the last, but also the third digit).
EXAMPLE
m=148 is in the sequence, because if we multiply 148 by k=3 (length of 148) we obtain 444, which is d||d||d for d=4 (second digit of 148)
PROG
(C++)
#include <iostream>
#include <math.h>
using namespace std;
int length(int a){for(int i=0; i<=10; i++){if(pow(10, i)<=a && pow(10, i+1)>a){return i+1; }}}
int DC(int a, int b){int c=(a%(int)(pow(10, b))-a%(int)(pow(10, b-1)))/(int)(pow(10, b-1)); int l=length(a); int s=0; for(int i=0; i<l; i++){s=s+(int)(pow(10, i)); }return s*c; }
int main() {for(int n=1; n<pow(10, 9); n++){int k=length(n); for(int i=1; i<=k; i++){if(k*n==DC(n, i)){cout<<n<<endl; }}}}
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Andrzej Kukla, Mar 02 2021
STATUS
approved