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 21-26 of 26 results.

A245802 Numbers that are divisible by the sum of their base 8 digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 14, 16, 21, 24, 28, 32, 35, 40, 42, 48, 49, 56, 64, 66, 70, 72, 75, 77, 84, 88, 90, 91, 98, 105, 112, 120, 126, 128, 129, 132, 133, 135, 140, 144, 145, 147, 150, 154, 161, 165, 168, 176, 180, 182, 192, 196, 198, 200, 203, 210, 216, 217
Offset: 1

Views

Author

Chai Wah Wu, Aug 22 2014

Keywords

Comments

A base 8 version of Harshad (or Niven) numbers (A005349).
Numbers n such that n = 0 modulo A053829(n), where the latter sequence gives the sum of digits when n is represented in the octal number system. - Antti Karttunen, Aug 22 2014

Examples

			36971 is in the sequence as it is 110153 in octal and 1 + 1 + 0 + 1 + 5 + 3 = 11 which divides 36971.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[256], IntegerQ[#/(Plus@@IntegerDigits[#, 8])] &] (* Alonso del Arte, Aug 26 2014 *)
  • Python
    from gmpy2 import digits
    A245802 = [n for n in range(1,10**3) if not n % sum([int(d) for d in digits(n,8)])]
    (MIT/GNU Scheme, with Antti Karttunen's IntSeq-library)
    (define A245802 (MATCHING-POS 1 1 (lambda (n) (zero? (modulo n (A053829 n))))))
    (define (A053829 n) (let loop ((n n) (i 0)) (if (zero? n) i (loop (floor->exact (/ n 8)) (+ i (modulo n 8))))))

A239694 Base 8 sum of digits of prime(n).

Original entry on oeis.org

2, 3, 5, 7, 4, 6, 3, 5, 9, 8, 10, 9, 6, 8, 12, 11, 10, 12, 4, 8, 3, 9, 6, 5, 6, 10, 12, 9, 11, 8, 15, 5, 4, 6, 9, 11, 10, 9, 13, 12, 11, 13, 16, 4, 8, 10, 8, 13, 10, 12, 9, 15, 10, 13, 5, 11, 10, 12, 11, 8, 10, 13, 13, 17, 12, 16, 9, 8, 11, 13, 10, 16, 17, 16
Offset: 1

Views

Author

Tom Edgar, Mar 24 2014

Keywords

Comments

a(n) is the rank of prime(n) in the base-8 dominance order on the natural numbers.

Examples

			The sixth prime is 13, 13 in base 8 is (1,5) so a(6)=1+5=6.
		

Crossrefs

Programs

  • Magma
    [&+Intseq(NthPrime(n),8): n in [1..100]]; // Vincenzo Librandi, Mar 25 2014
    
  • Mathematica
    Table[Plus @@ IntegerDigits[Prime[n], 8], {n, 1, 100}] (* Vincenzo Librandi, Mar 25 2014 *)
  • PARI
    a(n) = sumdigits(prime(n), 8); \\ Michel Marcus, Mar 04 2023
  • Sage
    [sum(i.digits(base=8)) for i in primes_first_n(200)]
    

Formula

a(n) = A053829(A000040(n)).

A245336 Sum of digits of n written in fractional base 8/7.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 13, 14, 15, 16, 17, 18, 19, 20, 18, 19, 20, 21, 22, 23, 24, 25, 22, 23, 24, 25, 26, 27, 28, 29, 25, 26, 27, 28, 29, 30, 31, 32, 27, 28, 29, 30, 31, 32, 33, 34, 28, 29, 30, 31, 32, 33, 34, 35, 28, 29, 30, 31
Offset: 0

Views

Author

Hailey R. Olafson, Jul 18 2014

Keywords

Comments

The base 8/7 expansion is unique and thus the sum of digits function is well-defined.

Examples

			In base 8/7 the number 14 is represented by 76 and so a(14) = 7 + 6 = 13.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, a[7 * Floor[n/8]] + Mod[n, 8]]; Array[a, 100, 0] (* Amiram Eldar, Aug 02 2025 *)
  • PARI
    a(n) = if(n == 0, 0, a(n\8 * 7) + n % 8); \\ Amiram Eldar, Aug 02 2025
  • Sage
    # uses [basepqsum from A245355]
    [basepqsum(8,7,w) for w in [0..200]]
    

Formula

a(n) = A007953(A024649(n)).

A245347 Sum of digits of n written in fractional base 8/3.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 9, 10, 6, 7, 8, 9, 10, 11, 12, 13, 4, 5, 6, 7, 8, 9, 10, 11, 7, 8, 9, 10, 11, 12, 13, 14, 10, 11, 12, 13, 14, 15, 16, 17, 8, 9, 10, 11, 12, 13, 14, 15, 11, 12, 13, 14, 15, 16, 17, 18, 4, 5, 6, 7, 8, 9, 10, 11, 7, 8, 9
Offset: 0

Views

Author

Hailey R. Olafson, Jul 18 2014

Keywords

Comments

The base 8/3 expansion is unique and thus the sum of digits function is well-defined.

Examples

			In base 8/3 the number 14 is represented by 36 and so a(14) = 3 + 6 = 9.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, a[3 * Floor[n/8]] + Mod[n, 8]]; Array[a, 100, 0] (* Amiram Eldar, Aug 02 2025 *)
  • PARI
    a(n) = if(n == 0, 0, a(n\8 * 3) + n % 8); \\ Amiram Eldar, Aug 02 2025
  • Sage
    # uses [basepqsum from A245355]
    [basepqsum(8,3,w) for w in [0..200]]
    

Formula

a(n) = A007953(A024645(n)).

A037331 Numbers whose base-7 and base-8 expansions have the same digit sum.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 91, 92, 93, 94, 95, 133, 134, 135, 176, 177, 178, 179, 180, 181, 217, 218, 219, 220, 221, 222, 223, 259, 260, 261, 262, 263, 304, 305, 306, 307, 385, 386, 387, 388, 389, 390, 391, 432, 433, 472, 473, 474, 475, 553
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    Select[Range[600],Total[IntegerDigits[#,7]]==Total[IntegerDigits[#,8]]&] (* Harvey P. Dale, Sep 05 2015 *)

Formula

{n: A053828(n) = A053829(n).} - R. J. Mathar, Jun 30 2021

A037334 Numbers whose base-8 and base-9 expansions have the same digit sum.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 120, 121, 122, 123, 124, 125, 176, 177, 178, 179, 234, 235, 236, 237, 238, 239, 288, 289, 290, 291, 292, 293, 294, 295, 344, 345, 346, 347, 348, 349, 350, 459, 460, 461, 462, 463, 568, 569, 570, 571, 572, 573
Offset: 1

Views

Author

Keywords

Examples

			125 is in the sequence because 125 = (1,4,8)_9 = (1,7,5)_8 and 1+4+8 = 1+7+5. 126 is not in the sequence because 126 = (1,5,0)_9 = (1,7,6)_8 but 1+5+0 <> 1+7+6. - _R. J. Mathar_, Jun 30 2021
		

Crossrefs

Formula

{n: A053829(n) = A053830(n)}. - R. J. Mathar, Jun 30 2021
Previous Showing 21-26 of 26 results.