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!)
A078213 Smallest multiple of n beginning and ending in n and with a digit sum that is divisible by n. 1
1, 2, 3, 4, 5, 6, 7, 8, 9, 10810, 119911, 12612, 1310413, 1411214, 15315, 162016, 1745917, 1818, 1968419, 207920, 2116821, 227722, 2318423, 244824, 252925, 269126, 272727, 283528, 2923229, 3069930, 31275931, 3268832, 3375933, 3457834 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MATHEMATICA
smn[n_]:=Module[{k=1, id=IntegerDigits[n], c}, c=k*n; While[Take[ IntegerDigits[ c], IntegerLength[n]]!=id||Take[IntegerDigits[c], -IntegerLength[ n]]!=id||!Divisible[Total[IntegerDigits[k*n]], n], k++; c=k*n]; k*n]; Array[smn, 35] (* Harvey P. Dale, Sep 04 2020 *)
PROG
(PARI) {for(n=1, 34, k=length(Str(n)); s=n; t=s+1; d=k-length(Str(m)); s=s*10^d; t=t*10^d; b=1; while(b>0, q=floor(s/n); while(b>0&&(p=q*n)<t, m=0; z=p; while(z>0, y=divrem(z, 10); z=y[1]; m=m+y[2]); if(p>=s&&(p%10^k) == n&&(m%n) == 0, print1(p, ", "); b=0, q++)); s=10*s; t=10*t))}
CROSSREFS
Cf. A078214.
Sequence in context: A082217 A082935 A077739 * A248794 A032555 A032559
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 22 2002
EXTENSIONS
Edited and extended by Klaus Brockhaus, Dec 09 2002
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 April 24 11:16 EDT 2024. Contains 371936 sequences. (Running on oeis4.)