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 91-100 of 163 results. Next

A276334 a(n) = A258199(n) * A276333(n).

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 72, 72, 72, 72, 72, 72, 72, 72
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

a(n) is obtained by first replacing with zeros all other digits except the leftmost (the most significant) in the greedy A001563-base representation of n (A276326), then converting back to decimal. Used to compute A276335.

Crossrefs

Programs

Formula

a(n) = A258199(n) * A276333(n).
A276335(n) = n - a(n).

A317826 Number of partitions of n with carry-free sum in factorial base.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 1, 2, 2, 5, 4, 11, 2, 4, 4, 11, 9, 26, 3, 7, 7, 21, 16, 52, 1, 2, 2, 5, 4, 11, 2, 5, 5, 15, 11, 36, 4, 11, 11, 36, 26, 92, 7, 21, 21, 74, 52, 198, 2, 4, 4, 11, 9, 26, 4, 11, 11, 36, 26, 92, 9, 26, 26, 92, 66, 249, 16, 52, 52, 198, 137, 560, 3, 7, 7, 21, 16, 52, 7, 21, 21, 74, 52, 198, 16, 52, 52, 198, 137, 560, 31, 109
Offset: 0

Views

Author

Antti Karttunen, Aug 08 2018

Keywords

Comments

"Carry-free sum" in this context means that when the digits of summands (written in factorial base, see A007623) are lined up (right-justified), then summing up of each column will not result in carries to any columns left of that column, that is, the sum of digits of the k-th column from the right (with the rightmost as column 1) over all the summands is the same as the k-th digit of n, thus at most k. Among other things, this implies that in any solution, at most one of the summands may be odd. Moreover, such an odd summand is present if and only if n is odd.
a(n) is the number of set partitions of the multiset that contains d copies of each number k, collected over all k in which digit-positions (the rightmost being k=1) there is a nonzero digit d in true factorial base representation of n, where also digits > 9 are allowed.
Distinct terms are the distinct terms in A050322, that is, A045782. - David A. Corneth & Antti Karttunen, Aug 10 2018

Examples

			  n  in fact.base  a(n) carry-free partitions
------------------------------
  0     "0"         1   {}    (unique empty partition, thus a(0) = 1)
  1     "1"         1   {1}
  2    "10"         1   {2}
  3    "11"         2   {2, 1} and {3}, in fact.base: {"10", "1"} and {"11"}
  4    "20"         2   {2, 2} and {4}, in fact.base: {"10" "10"} and {"20"}
  5    "21"         4   {2, 2, 1}, {3, 2}, {4, 1} and {5},
    in factorial base:  {"10", "10", "1"}, {"11", "10"}, {"20", "1"} and {"21"}.
		

Crossrefs

Cf. A001055, A007623, A025487, A045782 (range of this sequence), A050322, A276076, A278236.
Cf. A317827 (positions of records), A317828 (record values), A317829.
Cf. also A227154, A317836.

Programs

  • PARI
    fcnt(n, m) = {local(s); s=0; if(n == 1, s=1, fordiv(n, d, if(d > 1 & d <= m, s=s+fcnt(n/d, d)))); s};
    A001055(n) = fcnt(n, n); \\ From A001055
    A276076(n) = { my(i=0,m=1,f=1,nextf); while((n>0),i=i+1; nextf = (i+1)*f; if((n%nextf),m*=(prime(i)^((n%nextf)/f));n-=(n%nextf));f=nextf); m; };
    A317826(n) = A001055(A276076(n));
    
  • PARI
    \\ Slightly faster, memoized version:
    memA001055 = Map();
    A001055(n) = {my(v); if(mapisdefined(memA001055,n), v = mapget(memA001055,n), v = fcnt(n, n); mapput(memA001055,n,v); (v));}; \\ Cached version.
    A276076(n) = { my(i=0,m=1,f=1,nextf); while((n>0),i=i+1; nextf = (i+1)*f; if((n%nextf),m*=(prime(i)^((n%nextf)/f));n-=(n%nextf));f=nextf); m; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    A317826(n) = A001055(A046523(A276076(n)));

Formula

a(n) = A001055(A276076(n)) = A001055(A278236(n)).
a(A000142(n)) = 1.
a(A001563(n)) = A000041(n).
a(A033312(n+1)) = A317829(n) for n >= 1.

A336512 Total sum of the left-to-right minima in all compositions of n.

Original entry on oeis.org

0, 1, 3, 8, 17, 38, 78, 162, 330, 672, 1355, 2736, 5503, 11058, 22191, 44507, 89198, 178697, 357852, 716440, 1434041, 2869935, 5742801, 11490298, 22988084, 45988166, 91995547, 184021931, 368093352, 736266262, 1472660452, 2945526806, 5891385159, 11783304479
Offset: 0

Views

Author

Alois P. Heinz, Jul 23 2020

Keywords

Examples

			a(4) = 1 + 1 + 1 + 2 + 1 + 2 + 1 + 3 + 1 + 4 = 17: (1)111, (1)12, (1)21, (2)(1)1, (2)2, (1)3, (3)(1), (4).
		

Crossrefs

Cf. A001563 (the same for permutations of [n]), A336484, A336511, A336516, A336770.

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, [1, 0], add((p-> [0,
          `if`(j b(n, n+1)[2]:
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[Function[p, {0,
         If[j < m, j*p[[1]], 0]} + p][b[n - j, Min[m, j]]], {j, 1, n}]];
    a[n_] := b[n, n + 1][[2]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Mar 07 2022, after Alois P. Heinz *)

A069284 Decimal expansion of li(2) = gamma + log(log(2)) + Sum_{k>=1} log(2)^k / ( k*k! ).

Original entry on oeis.org

1, 0, 4, 5, 1, 6, 3, 7, 8, 0, 1, 1, 7, 4, 9, 2, 7, 8, 4, 8, 4, 4, 5, 8, 8, 8, 8, 9, 1, 9, 4, 6, 1, 3, 1, 3, 6, 5, 2, 2, 6, 1, 5, 5, 7, 8, 1, 5, 1, 2, 0, 1, 5, 7, 5, 8, 3, 2, 9, 0, 9, 1, 4, 4, 0, 7, 5, 0, 1, 3, 2, 0, 5, 2, 1, 0, 3, 5, 9, 5, 3, 0, 1, 7, 2, 7, 1, 7, 4, 0, 5, 6, 2, 6, 3, 8, 3, 3, 5, 6, 3, 0, 6, 0, 2
Offset: 1

Views

Author

Frank Ellermann, Mar 13 2002

Keywords

Comments

From Mats Granvik, Jun 14 2013: (Start)
The logarithmic integral li(x) = exponential integral Ei(log(x)).
The generating function for tau A000005, the number of divisors of n is: Sum_{n >= 1} a(n) x^n = Sum_{k > 0} x^k/(1 - x^k). Another way to write the generating function for tau A000005 is Sum_{n>=1} A000005(n) x^n = Sum_{a=1..Infinity} Sum_{b>=1} x^(a*b).
If we instead think of the integral with the same form, evaluate at x = exp(1) = 2.7182818284... = A001113 and set the integration limits to zero and sqrt(log(n)), we get for n >= 0:
Logarithmic integral li(n) = Integral_{a = 0..sqrt(log(n))} Integral_{b=0..sqrt(log(n))} exp(1)^(a*b) + EulerGamma + log(log(n)). (End)
li(2)-1 is the minimum [known to date, for n>1] of |li(n) - PrimePi(n)|. - Jean-François Alcover, Jul 10 2013
The modern logarithmic integral function li(x) = Integral_{t=0..x} (1/log(t)) replaced the Li(x) = Integral_{t=2..x} (1/log(t)) which was sometimes used because it avoids the singularity at x=1. This constant is the offset between the two functions: li(2) = li(x) - Li(x) = Integral_{t=0..2} (1/log(t)). - Stanislav Sykora, May 09 2015

Examples

			1.0451637801174927848445888891946131365226155781512015758329...
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, p. 425.

Crossrefs

Cf. A069285 (continued fraction), A057754, A057794, A060851.
Euler's constant gamma: A001620, log(2): A002162, k*k!: A001563.

Programs

Extensions

Replaced several occurrences of "Li" with "li" in order to enforce current conventions. - Stanislav Sykora, May 09 2015

A091364 a(n) = n! * n^4.

Original entry on oeis.org

0, 1, 32, 486, 6144, 75000, 933120, 12101040, 165150720, 2380855680, 36288000000, 584421868800, 9932577177600, 177849941068800, 3349041234739200, 66201014880000000, 1371195958099968000, 29707369682006016000
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Jan 07 2004

Keywords

Comments

Denominators in the power series expansion of the higher order exponential integral E(x,4,1) - ((gamma^4/24+Pi^2*gamma^2/24+zeta(3)*gamma/3+Pi^4/160) + (gamma^3/6+ Pi^2*gamma/12+ zeta(3)/3)*log(x) + (gamma^2/4+ Pi^2/24)*log(x)^2 + (gamma/6)*log(x)^3 + log(x)^4/24), n>0. See A163931 for information on the E(x,m,n). - Johannes W. Meijer, Oct 16 2009

Crossrefs

Cf. A163931 (E(x,m,n)), A001563 (n*n!), A002775 (n^2*n!), A091363 (n^3*n!). - Johannes W. Meijer, Oct 16 2009

Programs

  • Maple
    a:=n->sum(sum(sum((n+1)!-n!, j=1..n),k=1..n),m=1..n): seq(a(n), n=0..17); # Zerinvary Lajos, May 16 2007
  • Mathematica
    Table[n!n^4, {n, 0, 20}]

Formula

E.g.f.: (x + 11x^2 + 11x^3 + x^4)/(1 - x)^5

Extensions

More terms from Zerinvary Lajos, May 16 2007

A116853 Difference triangle of factorial numbers read by upward diagonals.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 11, 14, 18, 24, 53, 64, 78, 96, 120, 309, 362, 426, 504, 600, 720, 2119, 2428, 2790, 3216, 3720, 4320, 5040, 16687, 18806, 21234, 24024, 27240, 30960, 35280, 40320
Offset: 1

Views

Author

Gary W. Adamson, Feb 24 2006

Keywords

Comments

This is a subsequence of Euler's difference table A068106 and of A047920 (in a different ordering), since 0! = 1 was left out here. - Georg Fischer, Mar 23 2019

Examples

			Starting with 1, 2, 6, 24, 120 ... we take the first difference row (A001563), second, third, etc. Reorient into a flush left format, getting:
[1]    1;
[2]    1,   2;
[3]    3,   4,   6;
[4]   11,  14,  18,  24;
[5]   53,  64,  78,  96, 120;
[6]  309, 362, 426, 504, 600, 720;
...
		

Crossrefs

Cf. A000142 (factorial numbers).
Cf. A000255 (first column and inverse binomial transform of A000142).
N-th forward differences of A000142: A001563 (1st), A001564 (2nd), A001565 (3rd), A001688 (4th), A001689 (5th).
Cf. A047920 (with 0!, different order), A068106 (with 0!), A180191 (row sums), A246606 (central terms).

Programs

  • Haskell
    a116853 n k = a116853_tabl !! (n-1) !! (k-1)
    a116853_row n = a116853_tabl !! (n-1)
    a116853_tabl = map reverse $ f (tail a000142_list) [] where
       f (u:us) vs = ws : f us ws where ws = scanl (-) u vs
    -- Reinhard Zumkeller, Aug 31 2014
  • Mathematica
    rows = 8;
    rr = Range[rows]!;
    dd = Table[Differences[rr, n], {n, 0, rows-1}];
    T = Array[t, {rows, rows}];
    Do[Thread[Evaluate[Diagonal[T, -k+1]] = dd[[k, ;;rows-k+1]]], {k, rows}];
    Table[t[n, k], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 21 2019 *)

Formula

Take successive difference rows of factorial numbers n! starting with n=1. Reorient into a triangle format.

A130493 Triangle read by rows in which row n contains n! repeated n times.

Original entry on oeis.org

1, 2, 2, 6, 6, 6, 24, 24, 24, 24, 120, 120, 120, 120, 120, 720, 720, 720, 720, 720, 720, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 40320, 40320, 40320, 40320, 40320, 40320, 40320, 40320, 362880, 362880, 362880, 362880, 362880, 362880, 362880, 362880, 362880
Offset: 1

Views

Author

Gary W. Adamson, May 31 2007

Keywords

Comments

Row sums = A001563: (1, 4, 18, 96, 600, 4320, ...). A130477(n,k) * A130478(n,k) = A130493(n,k). Example: take dot products of rows with equal numbers of terms in A130477 and A130478, (1, 3, 8, 12) dot (24, 8, 3, 2) = (24, 24, 24, 24).

Examples

			First few rows of the triangle:
   1;
   2,  2;
   6,  6,  6;
  24, 24, 24, 24;
  ...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Table[n!,{n}],{n,10}]] (* Harvey P. Dale, Dec 24 2014 *)
    Table[PadRight[{},n,n!],{n,10}]//Flatten (* Harvey P. Dale, Jul 04 2022 *)
  • Python
    from math import isqrt
    from sympy import factorial
    def A130493(n): return factorial((m:=isqrt(k:=n<<1))+(k>m*(m+1))) # Chai Wah Wu, Nov 07 2024

Formula

Triangle, n! repeated n times per row.

Extensions

More terms from Sean A. Irvine, Jul 19 2022

A206816 a(n) = Sum_{0

Original entry on oeis.org

1, 9, 63, 447, 3447, 29367, 276327, 2856807, 32250087, 395130087, 5225062887, 74201293287, 1126567808487, 18213512883687, 312440245683687, 5668674457011687, 108462341176755687, 2182831421832627687, 46096712669420979687
Offset: 2

Views

Author

Clark Kimberling, Feb 12 2012

Keywords

Examples

			a(4) = (24-1) + (24-2) + (24-6) = 63.
		

Crossrefs

Programs

  • Maple
    seq(add(k^2*k!,k=1..n-1), n=2..30); # Ridouane Oudra, Jun 13 2025
  • Mathematica
    s[k_] := k!; t[1] = 0;
    p[n_] := Sum[s[k], {k, 1, n}];
    c[n_] := n*s[n] - p[n];
    t[n_] := t[n - 1] + (n - 1) s[n] - p[n - 1];
    Table[c[n], {n, 2, 32}]           (* A206816 *)
    Flatten[Table[t[n], {n, 2, 20}]]  (* A206817 *)
  • PARI
    a(n) = sum(j=1, n-1, n!-j!); \\ Michel Marcus, Jun 13 2025
  • Sage
    [sum([factorial(n)-factorial(j) for j in range(1,n)]) for n in range(2,21)] # Danny Rorabaugh, Apr 18 2015
    

Formula

a(n) = n*n!-p(n), where p(n) is the n-th partial sum of (j!).
a(n) = t(n)-t(n-1), where t = A206817.
a(n) = Sum_{k=1..n-1} k^2*k!. - Ridouane Oudra, Jun 13 2025
a(n) = A001563(n) - A007489(n). - Ridouane Oudra, Jun 14 2025

A241094 Triangle read by rows: T(n,i) = number of gracefully labeled graphs with n edges that do not use the label i, 1 <= i <= n-1, n > 1.

Original entry on oeis.org

0, 1, 1, 4, 4, 4, 18, 24, 24, 18, 96, 144, 144, 96, 600, 960, 1080, 1080, 960, 600, 4320, 7200, 8460, 8460, 8460, 7200, 4320, 35280, 60840, 75600, 80640, 80640, 75600, 60480, 35280, 322560, 564480, 725760, 806400, 806400, 806400, 725760, 564480, 322560
Offset: 2

Views

Author

Keywords

Comments

A graph with n edges is graceful if its vertices can be labeled with distinct integers in the range 0,1,...,n in such a way that when the edges are labeled with the absolute differences between the labels of their end-vertices, the n edges have the distinct labels 1,2,...,n.

Examples

			For n=7 and i=3, g(7,3) = 1080.
For n=7 and i=5, g(7,5) = 960.
Triangle begins:
[n\i]  [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]
[2]     0;
[3]     1,      1;
[4]     4,      4,      4;
[5]    18,     24,     24,     18;
[6]    96,    144,    144,    144,     96;
[7]   600,    960,   1080,   1080,    960,    600;
[8]  4320,   7200,   8640,   8640,   8640,   7200,   4320;
[9] 35280,  60480,  75600,  80640,  80640,  75600,  60480,  35280;
...
- _Bruno Berselli_, Apr 23 2014
		

Crossrefs

Programs

  • Magma
    /* As triangle: */ [[i le Floor(n/2) select Factorial(n-2)*(n-1-i)*i else Factorial(n-2)*(n-i)*(i-1): i in [1..n-1]]: n in [2..10]]; // Bruno Berselli, Apr 23 2014
  • Maple
    Labeled:=(i,n) piecewise(n<2 or i<1, -infinity, 1 <= i <= floor(n/2), GAMMA(n-1)*(n-1-i)*i, ceil((n+1)/2) <= i <= n-1, GAMMA(n-1)*(n-i)*(i-1), infinity):
  • Mathematica
    n=10; (* This number must be replaced every time in order to produce the different entries of the sequence *)
    For[i = 1, i <= Floor[n/2], i++, g[n_,i_]:=(n-2)!*(n-1-i)*i; Print["g(",n,",",i,")=", g[n,i]]]
    For[i = Ceiling[(n+1)/2], i <= (n-1), i++, g[n_,i_]:=(n-2)!*(n-i)*(i-1); Print["g(",n,",",i,")=",g[n,i]]]

Formula

For n >=2, if 1 <= i <= floor(n/2), g(n,i) = (n-2)!*(n-1-i)*i; if ceiling((n+1)/2) <= i <= n-1, g(n,i) = (n-2)!*(n-i)*(i-1).
# alternative
A241094 := proc(n,i)
if n <2 or i<1 or i >= n then
0;
elif i <= floor(n/2) then
GAMMA(n-1)*(n-1-i)*i;
else
GAMMA(n-1)*(n-i)*(i-1) ;
fi ;
end proc:
seq(seq(A241094(n,i),i=1..n-1),n=2..12); # R. J. Mathar, Jul 30 2024

A243573 Irregular triangular array generated as in Comments; contains every positive integer exactly once.

Original entry on oeis.org

1, 2, 4, 3, 5, 8, 16, 6, 9, 12, 17, 20, 32, 64, 7, 10, 13, 18, 21, 24, 33, 36, 48, 65, 68, 80, 128, 256, 11, 14, 19, 22, 25, 28, 34, 37, 40, 49, 52, 66, 69, 72, 81, 84, 96, 129, 132, 144, 192, 257, 260, 272, 320, 512, 1024, 15, 23, 26, 29, 35, 38, 41, 44, 50
Offset: 1

Views

Author

Clark Kimberling, Jun 07 2014

Keywords

Comments

Decree that (row 1) = (1), (row 2) = (2, 4), (row 3) = (3,5,8,16), (row 4) = (6,9,12,17,20,32,64). Let r(n) = A001563(n+3), so that r(r) = r(n-1) + r(n-2) + r(n-3) + r(n-4) with r(1) =1, r(2) = 2, r(3) = 4, r(4) = 7. Row n of the array, for n >= 5, consists of the numbers, in increasing order, defined as follows: all 4*x from x in row n-1, together with all 1 + 4*x from x in row n-2, together with all 2 + 4*x from x in row n-3, together with all 3 + 4*x for x in row n-4. Thus, the number of numbers in row n is r(n), a tetranacci number. Every positive integer occurs exactly once in the array, so that the resulting sequence is a permutation of the positive integers.

Examples

			First 5 rows of the array:
1
2 .. 4
3 .. 5 .. 8 .. 16
6 .. 9 .. 12 . 17 . 20 . 32 . 64
7 .. 10 . 13 . 18 . 21 . 24 . 33 . 36 . 48 . 65 . 68 . 80 . 128 . 256
		

Crossrefs

Programs

  • Mathematica
    z = 8; g[1] = {1}; f1[x_] := x + 1; f2[x_] := 4 x; h[1] = g[1];
    b[n_] := b[n] = DeleteDuplicates[Union[f1[g[n - 1]], f2[g[n - 1]]]];
    h[n_] := h[n] = Union[h[n - 1], g[n - 1]];
    g[n_] := g[n] = Complement [b[n], Intersection[b[n], h[n]]]
    u = Table[g[n], {n, 1, z}]; v = Flatten[u] (* A243573 *)
Previous Showing 91-100 of 163 results. Next