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-1 of 1 results.

A268444 a(n) = Product_{i=0..k}(n_i+1) where n = Sum_{i=0..k}n_i*4^i is the base-4 representation of n.

Original entry on oeis.org

1, 2, 3, 4, 2, 4, 6, 8, 3, 6, 9, 12, 4, 8, 12, 16, 2, 4, 6, 8, 4, 8, 12, 16, 6, 12, 18, 24, 8, 16, 24, 32, 3, 6, 9, 12, 6, 12, 18, 24, 9, 18, 27, 36, 12, 24, 36, 48, 4, 8, 12, 16, 8, 16, 24, 32, 12, 24, 36, 48, 16, 32, 48, 64, 2, 4, 6, 8, 4, 8, 12, 16, 6, 12, 18, 24
Offset: 0

Views

Author

Tom Edgar, Feb 04 2016

Keywords

Comments

a(n) gives the number of 1's in row n of A243756.

Examples

			The base-4 representation of 10 is (2,2) so a(10) = (2+1)*(2+1) = 9.
		

Crossrefs

Programs

  • PARI
    a(n) = my(d=digits(n,4)); prod(k=1, #d, d[k]+1); \\ Michel Marcus, Feb 05 2016
    
  • Python
    from math import prod
    from gmpy2 import digits
    def A268444(n):
        s = digits(n,4)
        return prod((int(d)+1)**s.count(d) for d in '123') # Chai Wah Wu, Apr 24 2025
  • Sage
    [prod(x+1 for x in n.digits(4)) for n in [0..75]]
    
  • Scheme
    (define (A268444 n) (if (zero? n) 1 (let ((d (mod n 4))) (* (+ 1 d) (A268444 (/ (- n d) 4)))))) ;; For R6RS standard. Use modulo instead of mod in older Schemes like MIT/GNU Scheme. - Antti Karttunen, May 28 2017
    

Formula

a(n) = Product_{i=0..k}(n_i+1) where n = Sum_{i=0..k}n_i*4^i.
Showing 1-1 of 1 results.