The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A064481 Divisible by the sum of the digits of its base-5 representation. 19

%I #11 Jun 24 2018 15:32:14

%S 1,2,3,4,5,6,8,10,12,15,16,18,20,24,25,26,27,28,30,32,36,40,42,45,48,

%T 50,51,52,54,56,60,63,64,65,66,72,75,76,78,80,85,88,90,91,96,99,100,

%U 102,104,105,112,117,120,125,126,128,130,132,135,136,138,140,144,145

%N Divisible by the sum of the digits of its base-5 representation.

%H Harry J. Smith, <a href="/A064481/b064481.txt">Table of n, a(n) for n = 1..1000</a>

%e Base-5 representation of 28 is 103; 1 + 0 + 3 = 4 divides 28.

%o (ARIBAS): maxarg := 160; for n := 1 to maxarg do if n mod sum(basearray(n,5)) = 0 then write(n," "); end; end; function basearray(n,b: integer): array; var k: integer; stk: stack; begin while n > 0 do k := n mod b; stack_push(stk,k); n := (n - k) div b; end; return stack2array(stk); end;.

%o (PARI) SumD(x)= { my(s); s=0; while (x>9, s+=x-10*(x\10); x\=10); return(s + x) }

%o baseE(x, b)= { my(d,e,f); e=0; f=1; while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=10); return(e) }

%o { n=0; for (m=1, 10^9, if (m%(SumD(baseE(m, 5)))==0, write("b064481.txt", n++, " ", m); if (n==1000, break)) ) } \\ _Harry J. Smith_, Sep 15 2009

%o (PARI) isok(n) = !(n % sumdigits(n, 5)); \\ _Michel Marcus_, Jun 24 2018

%Y Cf. A005349 (base 10), A049445 (base 2), A064150 (base 3), A064438 (base 4).

%K base,easy,nonn

%O 1,2

%A _Klaus Brockhaus_, Oct 03 2001

%E Offset changed from 0 to 1 by _Harry J. Smith_, Sep 15 2009

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 June 16 14:12 EDT 2024. Contains 373430 sequences. (Running on oeis4.)