cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-12 of 12 results.

A241989 Positive numbers n that are divisible by the sum of the digits of n in base 16.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 30, 32, 33, 35, 36, 40, 45, 48, 50, 54, 60, 64, 65, 66, 70, 72, 75, 80, 90, 96, 99, 100, 105, 108, 112, 120, 126, 128, 130, 132, 135, 140, 144, 150, 160, 165, 175, 176, 180, 192, 195, 198, 200
Offset: 1

Views

Author

Chai Wah Wu, Aug 22 2014

Keywords

Comments

A base 16 version of Harshad (or Niven) numbers (A005349).
Numbers n such that n = 0 modulo A053836(n). - Antti Karttunen, Aug 22 2014

Examples

			82478 is in the sequence as it is 1422E in hexadecimal and 1+4+2+2+14 = 23 which divides 82478.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200], Divisible[#, Total@ IntegerDigits[#, 16]] &] (* Indranil Ghosh, Jun 12 2017 *)
  • Python
    from gmpy2 import digits
    A241989 = [n for n in range(1,10**3) if not n % sum([int(d,16) for d in digits(n,16)])]
    (MIT/GNU Scheme, with Antti Karttunen's IntSeq-library)
    (define A241989 (MATCHING-POS 1 1 (lambda (n) (zero? (modulo n (A053836 n))))))
    (define (A053836 n) (let loop ((n n) (i 0)) (if (zero? n) i (loop (floor->exact (/ n 16)) (+ i (modulo n 16))))))

A135738 Least positive integer with even digit sum in bases 2..n.

Original entry on oeis.org

3, 6, 10, 10, 54, 54, 54, 54, 130, 130, 130, 130, 390, 390, 2000, 2000, 3238, 3238, 4080, 4080, 7326, 7326, 16584, 16584, 17310, 17310, 17310, 17310, 17310, 17310, 17310, 17310, 231000, 231000, 231000, 231000, 466352, 466352, 466352, 466352, 3020830
Offset: 2

Views

Author

M. F. Hasler, Dec 06 2007

Keywords

Comments

The sequence is obviously increasing. It seems that a(2n+1) = a(2n) for n > 1. Is there a simple proof? Is there a simple way to construct a(n)? Notice the pattern in base N, e.g., 130 = 10000010_2 = 11211_3 = 2002_4 = 1010_5 = 334_6 = 244_7 = 202_8 = 154_9 = 109_11 = {10}{10}_12 = {10}0_13.

Examples

			a(2)=3 since 1=1_2, 2=10_2, so 3=11_2 is the number > 0 with even digit sum (1+1) in base 2.
a(3)=6 since 4=100_2, 5=12_3, so 6=20_3=110_2 is the least N > 0 with even digit sum in base 2 and in base 3.
a(4)=a(5)=10=1010_2=101_3=22_4=20_5 is the least N > 0 having even digit sum in bases 2 through 4 and has so also in base 5.
		

Crossrefs

Programs

  • PARI
    digitsum(n,b=10,s)={n=[n];while(n=divrem(n[1],b),s+=n[2]);s}
    A135738(Bmax,n=1)={until(!n++,for(b=2,Bmax,digitsum(n,b)%2&next(2));return(n))} /* n-th element of the sequence */
    t=1;for(b=2,100,print(b,":",t=A135738(b,t))) /* display the list */

Extensions

Corrected example a(3)=5 to a(3)=6 David Yablon (davar55(AT)yahoo.com), Mar 19 2010
Previous Showing 11-12 of 12 results.