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.

A301652 Triangle read by rows: row n gives the digits of n in factorial base in reversed order.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 2, 1, 1, 2, 1, 0, 0, 2, 1, 0, 2, 0, 1, 2, 1, 1, 2, 0, 2, 2, 1, 2, 2, 0, 0, 3, 1, 0, 3, 0, 1, 3, 1, 1, 3, 0, 2, 3, 1, 2, 3, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 2, 0, 1, 1, 2, 0, 1, 0, 0, 1, 1
Offset: 0

Views

Author

Seiichi Manyama, Mar 25 2018

Keywords

Comments

Row n gives exponents for successive primes 2, 3, 5, 7, 11, etc., in the prime factorization of A276076(n). - Antti Karttunen, Mar 11 2024

Examples

			   n | 1  2  6
  ---+---------
   0 | 0;
   1 | 1;
   2 | 0, 1;
   3 | 1, 1;
   4 | 0, 2;
   5 | 1, 2;
   6 | 0, 0, 1;
   7 | 1, 0, 1;
   8 | 0, 1, 1;
   9 | 1, 1, 1;
  10 | 0, 2, 1;
  11 | 1, 2, 1;
  12 | 0, 0, 2;
  13 | 1, 0, 2;
  14 | 0, 1, 2;
  15 | 1, 1, 2;
  16 | 0, 2, 2;
  17 | 1, 2, 2;
  18 | 0, 0, 3;
  19 | 1, 0, 3;
		

Crossrefs

Triangle A108731 with rows reversed.
Cf. A007623, A034968 (row sums), A208575 (row products), A227153 (products of nonzero terms on row n), A276076, A301593.

Programs

  • Mathematica
    row[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, AppendTo[s, r]; m++]; s]; row[0] = {0}; Array[row, 31, 0] // Flatten (* Amiram Eldar, Mar 11 2024 *)
  • Sage
    terms=25; print([0]+[x for sublist in [[floor(n/factorial(i))%(i+1) for i in [k for k in [1..n] if factorial(k)<=n]] for n in [1..terms]] for x in sublist]) # Tom Edgar, Aug 15 2018

Formula

T(n,k) = floor(n/k!) mod k+1. - Tom Edgar, Aug 15 2018