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

A089359 Primes which can be partitioned into distinct factorials. 0! and 1! are not considered distinct.

Original entry on oeis.org

2, 3, 7, 31, 127, 151, 727, 751, 5167, 5791, 5881, 40351, 40471, 41047, 41161, 45361, 45481, 362911, 363751, 368047, 368647, 368791, 403327, 403951, 408241, 408271, 408361, 409081, 3628927, 3629671, 3633991, 3634591, 3669241, 3669847, 3669961
Offset: 1

Views

Author

Amarnath Murthy, Nov 07 2003

Keywords

Examples

			From _Seiichi Manyama_, Mar 24 2018: (Start)
n | a(n) |
--+------+------------------
1 |    2 | 2!
2 |    3 | 2! + 1!
3 |    7 | 3! + 1!
4 |   31 | 4! + 3! + 1!
5 |  127 | 5! + 3! + 1!
6 |  151 | 5! + 4! + 3! + 1! (End)
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    def facbase(k, f):
        return sum(f[i] for i, bi in enumerate(bin(k)[2:][::-1]) if bi == "1")
    def auptoN(N): # terms up to N factorial-base digits; 20 generates b-file
        f = [factorial(i) for i in range(1, N+1)]
        return list(filter(isprime, (facbase(k, f) for k in range(2**N))))
    print(auptoN(10)) # Michael S. Branicky, Oct 15 2022

Extensions

More terms from Vladeta Jovovic, Nov 08 2003

A301523 Integers which can be partitioned into two distinct factorials. 0! and 1! are not considered distinct.

Original entry on oeis.org

3, 7, 8, 25, 26, 30, 121, 122, 126, 144, 721, 722, 726, 744, 840, 5041, 5042, 5046, 5064, 5160, 5760, 40321, 40322, 40326, 40344, 40440, 41040, 45360, 362881, 362882, 362886, 362904, 363000, 363600, 367920, 403200, 3628801, 3628802, 3628806, 3628824, 3628920, 3629520, 3633840, 3669120, 3991680
Offset: 1

Views

Author

Seiichi Manyama, Mar 23 2018

Keywords

Comments

Numbers of the form i! + j! where i > j > 0. - Altug Alkan, Mar 23 2018
Primes in this sequence are A088332(n) for n > 1.

Examples

			    + |   1    2    6   24
  ----+--------------------
    1 |
    2 |   3;
    6 |   7,   8;
   24 |  25,  26,  30;
  120 | 121, 122, 126, 144;
		

Crossrefs

Programs

  • Mathematica
    Union[Total/@Subsets[Range[10]!,{2}]] (* Harvey P. Dale, Aug 25 2020 *)

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