login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(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)
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).
LINKS
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
Sequence in context: A001104 A151544 A032561 * A306360 A023052 A005188
KEYWORD
nonn,base,fini,full
AUTHOR
Andrzej Kukla, Mar 02 2021
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 02:00 EDT 2024. Contains 372203 sequences. (Running on oeis4.)