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.

A007823 A007824(n)/16.

Original entry on oeis.org

1, 2, 5, 14, 45, 186, 945, 5778, 44037, 403470, 4344877, 56072378, 793804721, 12734185106, 229632768005, 4628786367502, 105803768420397, 2626282179198138, 71539181027191729, 2076395667668755090, 65704452165048754181
Offset: 0

Views

Author

Ralph Buchholz [ ralph(AT)defcen.gov.au ], Leisa Condie

Keywords

Comments

Previous name was: For N=Sum a(i).2^i, where the a(i) are binary, define a "derivative" D(N)/D(2)=Sum i.a(i).2^(i-1); sequence gives n-th derivative of 16 (divided by 16) (cf A007824).

Formula

a(n) = A007824(n)/16. - Michel Marcus, Jul 18 2013

Extensions

Edited by Michel Marcus, Jul 18 2013

A333979 Array read by antidiagonals, n >= 0, k >= 2: T(n,k) is the "digital derivative" of n in base k; if the base k representation of n is Sum_{j>=0} d_j*k^j, then T(n,k) = Sum_{j>=1} d_j*j*k^(j-1).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 4, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 1, 1, 5, 0, 0, 0, 0, 0, 1, 2, 5, 0, 0, 0, 0, 0, 1, 1, 2, 12, 0, 0, 0, 0, 0, 0, 1, 1, 2, 12, 0, 0, 0, 0, 0, 0, 1, 1, 2, 6, 13, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 6, 13
Offset: 0

Views

Author

Pontus von Brömssen, Sep 04 2020

Keywords

Examples

			Array begins:
  n\k|  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16
  ---|---------------------------------------------
   0 |  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
   1 |  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
   2 |  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0
   3 |  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0
   4 |  4  1  1  0  0  0  0  0  0  0  0  0  0  0  0
   5 |  4  1  1  1  0  0  0  0  0  0  0  0  0  0  0
   6 |  5  2  1  1  1  0  0  0  0  0  0  0  0  0  0
   7 |  5  2  1  1  1  1  0  0  0  0  0  0  0  0  0
   8 | 12  2  2  1  1  1  1  0  0  0  0  0  0  0  0
   9 | 12  6  2  1  1  1  1  1  0  0  0  0  0  0  0
  10 | 13  6  2  2  1  1  1  1  1  0  0  0  0  0  0
  11 | 13  6  2  2  1  1  1  1  1  1  0  0  0  0  0
  12 | 16  7  3  2  2  1  1  1  1  1  1  0  0  0  0
  13 | 16  7  3  2  2  1  1  1  1  1  1  1  0  0  0
  14 | 17  7  3  2  2  2  1  1  1  1  1  1  1  0  0
  15 | 17  8  3  3  2  2  1  1  1  1  1  1  1  1  0
  16 | 32  8  8  3  2  2  2  1  1  1  1  1  1  1  1
64 = 2*3^3 + 1*3^2 + 0*3^1 + 1*3^0, so T(64,3) = 2*3*3^2 + 1*2*3^1 + 0*1*3^0 = 60. Alternatively, using the formula T(n,k) = floor(n/k) + k*T(floor(n/k),k), we get T(64,3) = 21 + 3*T(21,3) = 21 + 3*(7 + 3*T(7,3)) = 42 + 9*(2 + 3*T(2,3)) = 60.
		

Crossrefs

Cf. A136013 (column k=2), A080277 (every second term of column k=2), A080333 (every third term of column k=3).

Programs

  • Python
    import sympy
    def A333979(n,k):
      d=sympy.ntheory.factor_.digits(n,k)
      return sum(j*d[-j-1]*k**(j-1) for j in range(1,len(d)-1))
    
  • Python
    # Second program (faster)
    def A333979(n,k):
      return n//k+k*A333979(n//k,k) if n>=k else 0

Formula

T(n,k) = floor(n/k) + k*T(floor(n/k),k). Proof: With n = Sum_{j>=0} d_j*k^j we have floor(n/k) + k*T(floor(n/k),k) = Sum_{j>=1} (d_j*k^(j-1) + k*d_j*(j-1)*k^(j-2)) = Sum_{j>=1} d_j*j*k^(j-1) = T(n,k).
T(n,k) = T(n-1,k) + A055129(A286561(n,k),k). Proof: Let n = Sum_{j>=0} d_j*k^j and pick v so that d_j = 0 for j < v and d_v > 0 (so v = A286561(n,k)). Then n - 1 = sum_{j>=0} e_j*k^j, where e_j = k - 1 for j < v, e_v = d_v - 1, and e_j = d_j for j > v. We get T(n,k) - T(n-1,k) = Sum_{j>=1} j*(d_j-e_j)*k^(j-1) = v*k^(v-1) - (k-1)*Sum_{1<=jA055129(A286561(n,k),k).
For fixed k, T(n,k) ~ n*log(n)/(k*log(k)). (The proof for k = 2 by Bannister et al. (p. 182) can be adapted to general k.)
T(n,k) = Sum_{j>=0} k^j*floor(n/k**(j+1)).
Showing 1-2 of 2 results.