The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.



(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342157 Base-10 numbers m such that k*m = d||d||...||d (here || appears k-1 times), where k is the length of m, d is any m's digit and || represents concatenation. 0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 148, 185, 148148 (list; graph; refs; listen; history; text; internal format)



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).


Table of n, a(n) for n=1..13.


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)



#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; }}}}


Sequence in context: A001104 A151544 A032561 * A306360 A023052 A005188

Adjacent sequences:  A342154 A342155 A342156 * A342158 A342159 A342160




Andrzej Kukla, Mar 02 2021



Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 16:50 EDT 2021. Contains 347586 sequences. (Running on oeis4.)