login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A069525 Smallest multiple of n with digit sum = 6, or 0 if no such number exists, e.g. a(9k)= 0. 6
6, 6, 6, 24, 15, 6, 42, 24, 0, 60, 33, 24, 312, 42, 15, 240, 51, 0, 114, 60, 42, 132, 1104, 24, 150, 312, 0, 420, 1131, 60, 1023, 2112, 33, 204, 105, 0, 222, 114, 312, 240, 123, 42, 1032, 132, 0, 1104, 141, 240, 12201, 150, 51, 312, 1113, 0, 330, 4200, 114, 4002, 2301 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

In addition to those divisible by 9, all numbers n divisible by 239, 271 or 803 have a(n)=0. - Robert Israel, Sep 04 2019

LINKS

Robert Israel, Table of n, a(n) for n = 1..2500

FORMULA

a(n) = n*A088395(n). - R. J. Mathar, Aug 06 2019

MAPLE

N:= 1000: # to get a(1)..a(N)

nextL:= proc(L)

local m, q, Lp;

for m from 1 do

   if L[m] > 0 then

    if m = LinearAlgebra:-Dimension(L) then return <5, 0$(m-1), 1>

    else Lp:= L;

       Lp[1]:= L[m]-1;

       Lp[2..m]:= 0;

       Lp[m+1]:= L[m+1]+1;

       return Lp;

    fi

   fi

od;

end proc:

nogo:= proc(n) local m, a2, a5, S, S2, S3, i, j;

  a2:= padic:-ordp(n, 2);

  a5:= padic:-ordp(n, 5);

  m:= numtheory:-order(10, n/(2^a2*5^a5))+max(a2, a5);

  S:= {seq(10^i mod n, i=0..m-1)};

  S2:= {seq(seq(S[i]+S[j] mod n, j=1..i), i=1..nops(S))};

  S3:= {seq(seq(S[i]+ S2[j] mod n, j=1..nops(S2)), i=1..nops(S))};

  evalb(S3 intersect map(t -> -t mod n, S3) = {});

end proc:

Agenda:= remove(t -> (t mod 9=0 or t mod 239=0 or t mod 271=0 or t mod 803=0, {$1..N}):

L:= <6>: x:= 6:

A:= Vector(N):

while Agenda <> {} and x < 10^20 do

  x:= add(L[i]*10^(i-1), i=1..LinearAlgebra:-Dimension(L));

  found, Agenda:= selectremove(t -> x mod t = 0, Agenda);

  if found <> {} then

    A[convert(found, list)]:= x;

  fi;

  L:= nextL(L);

od:

Agenda:= remove(nogo, Agenda);

if Agenda <> {} then printf("Values not found for %a\n", Agenda) fi;

convert(A, list); # Robert Israel, Sep 04 2019

MATHEMATICA

Array[If[AnyTrue[Mod[#, {9, 239, 271, 803}], # == 0 &], 0, Block[{k = 1}, While[Total@ IntegerDigits[k #] != 6, k++]; k #]] &, 59] (* Michael De Vlieger, Sep 04 2019 *)

CROSSREFS

Cf. A062220, A069521, A069522, A069523, A069524.

Sequence in context: A254572 A109047 A153171 * A054435 A019175 A245100

Adjacent sequences:  A069522 A069523 A069524 * A069526 A069527 A069528

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy, Apr 01 2002

EXTENSIONS

More terms from Ray Chandler, Jul 30 2003

STATUS

approved

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 October 21 16:25 EDT 2019. Contains 328302 sequences. (Running on oeis4.)