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.

Showing 1-2 of 2 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))))))

A325309 Square array read by downward antidiagonals: A(n, k) is the k-th Niven number (or Harshad number) in base n.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 6, 3, 2, 1, 8, 4, 3, 2, 1, 10, 6, 4, 3, 2, 1, 12, 8, 6, 4, 3, 2, 1, 16, 9, 8, 5, 4, 3, 2, 1, 18, 10, 9, 6, 5, 4, 3, 2, 1, 20, 12, 12, 8, 6, 5, 4, 3, 2, 1, 21, 15, 16, 10, 10, 6, 5, 4, 3, 2, 1, 24, 16, 18, 12, 12, 7, 6, 5, 4, 3, 2, 1, 32, 18
Offset: 2

Views

Author

Felix Fröhlich, Sep 06 2019

Keywords

Examples

			The array starts as follows:
1, 2, 4, 6, 8, 10, 12, 16, 18, 20, 21, 24, 32, 34, 36, 40, 42, 48, 55, 60
1, 2, 3, 4, 6,  8,  9, 10, 12, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32
1, 2, 3, 4, 6,  8,  9, 12, 16, 18, 20, 21, 24, 28, 30, 32, 33, 35, 36, 40
1, 2, 3, 4, 5,  6,  8, 10, 12, 15, 16, 18, 20, 24, 25, 26, 27, 28, 30, 32
1, 2, 3, 4, 5,  6, 10, 12, 15, 18, 20, 24, 25, 30, 36, 40, 42, 44, 45, 48
1, 2, 3, 4, 5,  6,  7,  8,  9, 12, 14, 15, 16, 18, 21, 24, 27, 28, 30, 32
1, 2, 3, 4, 5,  6,  7,  8, 14, 16, 21, 24, 28, 32, 35, 40, 42, 48, 49, 56
1, 2, 3, 4, 5,  6,  7,  8,  9, 10, 12, 16, 18, 20, 24, 27, 28, 30, 32, 36
1, 2, 3, 4, 5,  6,  7,  8,  9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42
1, 2, 3, 4, 5,  6,  7,  8,  9, 10, 11, 12, 15, 20, 22, 24, 25, 30, 33, 35
1, 2, 3, 4, 5,  6,  7,  8,  9, 10, 11, 12, 22, 24, 33, 36, 44, 48, 55, 60
1, 2, 3, 4, 5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 18, 24, 26, 27
1, 2, 3, 4, 5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 26, 28, 39, 42, 52, 56
1, 2, 3, 4, 5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 21, 28, 30, 32
1, 2, 3, 4, 5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 30, 32
1, 2, 3, 4, 5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 24
1, 2, 3, 4, 5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 34, 36
		

Crossrefs

Cf. A049445 (row 2), A064150 (row 3), A064438 (row 4), A064481 (row 5), A245802 (row 8), A005349 (row 10).
Cf. A005349.

Programs

  • PARI
    row(n, terms) = my(i=0); for(x=1, oo, if(i >= terms, break); if(x%sumdigits(x, n)==0, print1(x, ", "); i++))
    array(rows, cols) = for(x=2, rows+1, row(x, cols); print(""))
    array(18, 20) \\ Print initial 18 rows and 20 columns of array
Showing 1-2 of 2 results.