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 51-60 of 92 results. Next

A335545 A(n,k) is the sum of the k-th powers of the (positive) number of permutations of [n] with j descents (j=0..max(0,n-1)); square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 6, 4, 1, 1, 2, 18, 24, 5, 1, 1, 2, 66, 244, 120, 6, 1, 1, 2, 258, 2664, 5710, 720, 7, 1, 1, 2, 1026, 29284, 322650, 188908, 5040, 8, 1, 1, 2, 4098, 322104, 19888690, 55457604, 8702820, 40320, 9, 1, 1, 2, 16386, 3543124, 1276095330, 16657451236, 17484605040, 524888040, 362880, 10
Offset: 0

Views

Author

Alois P. Heinz, Sep 12 2020

Keywords

Examples

			Square array A(n,k) begins:
  1,   1,      1,        1,           1,             1, ...
  1,   1,      1,        1,           1,             1, ...
  2,   2,      2,        2,           2,             2, ...
  3,   6,     18,       66,         258,          1026, ...
  4,  24,    244,     2664,       29284,        322104, ...
  5, 120,   5710,   322650,    19888690,    1276095330, ...
  6, 720, 188908, 55457604, 16657451236, 5025377832180, ...
  ...
		

Crossrefs

Columns k=0-2 give: A028310, A000142, A168562.
Rows n=0+1, 2-3 give: A000012, A007395(k+1), A178789(k+1).
Main diagonal gives A335546.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          expand(add(b(u-j, o+j-1, 1)*x^t, j=1..u))+
                 add(b(u+j-1, o-j, 1), j=1..o))
        end:
    A:= (n, k)-> (p-> add(coeff(p, x, i)^k, i=0..degree(p)))(b(n, 0$2)):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
    # second Maple program:
    A:= (n, k)-> add(combinat[eulerian1](n, j)^k, j=0..max(0, n-1)):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    B[n_, k_] := B[n, k] = Sum[(-1)^j*Binomial[n+1, j]*(k-j+1)^n, {j, 0, k+1}];
    A[0, ] = 1; A[n, k_] := Sum[B[n, j]^k, {j, 0, n-1}];
    Table[A[n, d-n], {d, 0, 10}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 11 2021 *)

Formula

A(n,k) = Sum_{j=0..max(0,n-1)} A173018(n,j)^k.

A347707 Number of distinct possible integer reverse-alternating products of integer partitions of n.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 8, 8, 9, 9, 11, 11, 13, 12, 14, 14, 15, 15, 18, 17, 19, 18, 20, 20, 22, 21, 25, 23, 26, 25, 28, 26, 29, 27, 31, 29, 32, 31, 34, 33, 35, 34, 38, 35, 41, 37, 42, 40, 43, 41, 45, 42, 46, 44, 48, 45, 50, 46, 52, 49, 53
Offset: 0

Views

Author

Gus Wiseman, Oct 13 2021

Keywords

Comments

We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)). The reverse-alternating product is the alternating product of the reversed sequence.

Examples

			Representative partitions for each of the a(16) = 11 alternating products:
         (16) -> 16
     (14,1,1) -> 14
     (12,2,2) -> 12
     (10,3,3) -> 10
      (8,4,4) -> 8
  (9,3,2,1,1) -> 6
     (10,4,2) -> 5
     (12,3,1) -> 4
  (6,4,2,2,2) -> 3
     (10,5,1) -> 2
        (8,8) -> 1
		

Crossrefs

The even-length version is A000035.
The non-reverse version is A028310.
The version for factorizations has special cases:
- no changes: A046951
- non-reverse: A046951
- non-integer: A038548
- odd-length: A046951 + A010052
- non-reverse non-integer: A347460
- non-integer odd-length: A347708
- non-reverse odd-length: A046951 + A010052
- non-reverse non-integer odd-length: A347708
The odd-length version is a(n) - A059841(n).
These partitions are counted by A347445, non-reverse A347446.
Counting non-integers gives A347462, non-reverse A347461.
A000041 counts partitions.
A027187 counts partitions of even length.
A027193 counts partitions of odd length.
A103919 counts partitions by sum and alternating sum, reverse A344612.
A119620 counts partitions with alternating product 1, ranked by A028982.
A276024 counts distinct positive subset-sums of partitions, strict A284640.
A304792 counts distinct subset-sums of partitions.
A325534 counts separable partitions, complement A325535.
A345926 counts possible alternating sums of permutations of prime indices.

Programs

  • Mathematica
    revaltprod[q_]:=Product[Reverse[q][[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[Union[revaltprod/@IntegerPartitions[n]],IntegerQ]],{n,0,30}]

A000660 Boustrophedon transform of 1,1,2,3,4,5,...

Original entry on oeis.org

1, 2, 5, 14, 41, 136, 523, 2330, 11857, 67912, 432291, 3027166, 23125673, 191389108, 1705788659, 16289080922, 165919213089, 1795666675824, 20576824369027, 248892651678198, 3168999664907705, 42366404751871660, 593368400878431795, 8688251294851280594
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a000660 n = sum $ zipWith (*) (a109449_row n) (1 : [1..])
    -- Reinhard Zumkeller, Nov 04 2013
    
  • Maple
    seq(coeff(series(factorial(n)*(x*exp(x)+1)*(sec(x)+tan(x)), x,n+1),x,n),n=0..25); # Muniru A Asiru, Jul 30 2018
  • Mathematica
    a[n_] := n! SeriesCoefficient[(1+x Exp[x])(1+Sin[x])/Cos[x], {x, 0, n}];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Jul 30 2018, after Sergei N. Gladkovskii *)
  • Python
    from itertools import accumulate, count, islice
    def A000660_gen(): # generator of terms
        yield 1
        blist = (1,)
        for i in count(1):
            yield (blist := tuple(accumulate(reversed(blist),initial=i)))[-1]
    A000660_list = list(islice(A000660_gen(),40)) # Chai Wah Wu, Jun 12 2022
  • Sage
    # Algorithm of L. Seidel (1877)
    def A000660_list(n) :
        R = []; A = {-1:0, 0:1}
        k = 0; e = 1
        for i in range(n) :
            Am = i
            A[k + e] = 0
            e = -e
            for j in (0..i) :
                Am += A[k]
                A[k] = Am
                k += e
            print([A[z] for z in (-i//2..i//2)])
            R.append(A[e*i//2])
        return R
    A000660_list(10) # Peter Luschny, Jun 02 2012
    

Formula

a(n) = Sum_{k=0..n} A109449(n,k)*A028310(k). - Reinhard Zumkeller, Nov 04 2013
E.g.f.: (x*exp(x) + 1)*(sec(x) + tan(x)). - Sergei N. Gladkovskii, Oct 28 2014
a(n) = A231179(n) + A000111(n). - Sergei N. Gladkovskii, Oct 28 2014
a(n) ~ n! * (2 + Pi*exp(Pi/2)) * (2/Pi)^(n+1). - Vaclav Kotesovec, Jun 12 2015

A078444 Floor of geometric mean of two consecutive primes.

Original entry on oeis.org

2, 3, 5, 8, 11, 14, 17, 20, 25, 29, 33, 38, 41, 44, 49, 55, 59, 63, 68, 71, 75, 80, 85, 92, 98, 101, 104, 107, 110, 119, 128, 133, 137, 143, 149, 153, 159, 164, 169, 175, 179, 185, 191, 194, 197, 204, 216, 224, 227, 230, 235, 239, 245, 253, 259, 265, 269, 273, 278
Offset: 1

Views

Author

Lior Manor, Dec 31 2002

Keywords

Comments

For n > 1, a(n) = prime(n) iff prime(n) and prime(n+1) are twin primes.

Examples

			a(7) = floor(sqrt(prime(7)*prime(8))) = 17.
		

Crossrefs

Programs

  • Magma
    [Floor(Sqrt(NthPrime(n)*NthPrime(n+1))): n in [1..60]]; // Vincenzo Librandi, Dec 12 2015
    
  • Maple
    seq(floor(sqrt(ithprime(i)*ithprime(i+1))), i=1..100); # Robert Israel, Dec 12 2015
  • Mathematica
    Table[Floor[Sqrt[Prime[n] Prime[n + 1]]], {n, 60}] (* Vincenzo Librandi, Dec 12 2015 *)
    Table[Ceiling[(Prime[n] + Prime[n + 1])/2 - 1], {n, 100}] (* Miko Labalan, Dec 14 2015 *)
  • PARI
    a(n) = sqrtint(prime(n)*prime(n+1)); \\ Michel Marcus, Dec 12 2015

Formula

a(n) = floor(sqrt(prime(n)*prime(n+1))).
From Miko Labalan, Dec 12 2015: (Start)
a(n) = A006254(A028310(n - 1)) + A067076(n);
a(n) = A067076(A028310(n - 1)) + A006254(n);
a(n) = A005097(A028310(n - 1)) + A005097(n).
(End)
For n >= 2 these formulas are equivalent to sqrt(prime(n)*prime(n+1)) > (prime(n)+prime(n+1))/2 - 1, and thus to A001223(n) <= 2 + 2*sqrt(2*prime(n)). This would be implied by Andrica's conjecture, but is as yet unproven. - Robert Israel, Dec 13 2015

A195287 a(n) = (A091137(n)/n!) * Integral_{u=-1..1} u*(u+1)*...*(u+n-1) du.

Original entry on oeis.org

2, 0, 4, 8, 232, 448, 18224, 35424, 1036064, 2025472, 130960832, 257072000, 689908475264, 1358275350528, 8031885897472, 15847920983552, 7981032500085248, 15774370258485248, 12448755354530366464
Offset: 0

Views

Author

Paul Curtz, Sep 20 2011

Keywords

Comments

Numerators of the second row of an array based on Adams numerical integration. Take q!*s(m,q) = Integral_{-m-1..1} u*(u+1)*...*(u+q-1) du. a(n) is in the second row (case m=0) numerators of s(m,q) in the comments.
The unreduced array s(m,q), (m=-1,0,1,..., columns q=0,1,2,...) is
1, 1/2, 5/12, 9/24, 251/720, 475/1440, = A002657(n)/A091137(n),
2, 0, 4/12, 8/24, 232/720, 448/1440, = a(n)/A091137(n),
3, -3/2, 9/12, 9/24, 243/720, 459/1440,
4, -8/2, 32/12, 0, 224/720, 448/1440,
5, -15/2, 85/12, -55/24, 475/720, 475/1440,
6, -24/2, 180/12, -216/24, 2376/720, 0.
Column numerators: A000027, -A067998(n), A152064(n), A157371(n), A165281(n).
Page 56 of the reference.
(*) 2/2 = 1,
2/2 + 0 = 1,
2/3 + 0 + 1/3 = 1,
2/4 + 0 + 1/6 + 1/3 = 1. Reduced.

References

  • P. Curtz, Intégration numérique des systèmes differentiels à conditions initiales, Centre de Calcul Scientifique de l'Armement, Arcueil, 1969.

Programs

  • Maple
    A195287 := proc(n)
            mul(u+i,i=0..n-1) ;
            int(%,u=-1..1) ;
            %/n!*A091137(n) ;
    end proc:
    seq(A195287(n),n=0..20) ; # R. J. Mathar, Oct 02 2011
  • Mathematica
    (* a7 = A091137 *) a7[n_] := a7[n] = Product[d, {d, Select[Divisors[n] + 1, PrimeQ]}]*a7[n-1]; a7[0]=1; a[n_] := a7[n]/n!*Integrate[ Pochhammer[u, n], {u, -1, 1}]; Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Aug 13 2012 *)

Formula

b(n) = a(n)/A091137(n).
b(0)/2 = 1,
b(0)/2 + b(1) = 1,
b(0)/3 + b(1)/2 + b(2) = 1,
b(0)/4 + b(1)/3 + b(2)/2 + b(3) = 1.
First vertical denominators: A028310(n) + 1. See A104661.
Values in (*).

A212393 Expansion of (1-4*x+7*x^2-5*x^3+4*x^4-6*x^5+21*x^6+18*x^7-5*x^8)/(1-x)^5.

Original entry on oeis.org

1, 1, 2, 5, 14, 30, 72, 195, 485, 1059, 2065, 3682, 6120, 9620, 14454, 20925, 29367, 40145, 53655, 70324, 90610, 115002, 144020, 178215, 218169, 264495, 317837, 378870, 448300, 526864, 615330, 714497, 825195, 948285, 1084659, 1235240, 1400982, 1582870, 1781920
Offset: 0

Views

Author

Bruno Berselli, May 14 2012

Keywords

Comments

In the paper of Kitaev, Remmel and Tiefenbruck (see the Links section), Q_(132)^(0,k,0,0)(x,0) represents a generating function depending on k and x.
For successive values of k we have:
k=1, the g.f. of A000012: 1/(1-x);
k=2, the g.f. of A028310: (1-x+x^2)/(1-x)^2;
k=3, the g.f. (1-2*x+2*x^2+x^3-x^4)/(1-x)^3, whose coefficients (except the first two) are given by A000096 (for n>0);
k=4, the g.f. (1-3*x+4*x^2-x^3+3*x^4-5*x^5+2*x^6)/(1-x)^4, whose coefficients (except the first three) are given by A005586 (for n>0).
This sequence corresponds to the case k=5.

Programs

  • Magma
    m:=39; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-4*x+7*x^2-5*x^3+4*x^4-6*x^5+21*x^6+18*x^7-5*x^8)/(1-x)^5));
  • Mathematica
    CoefficientList[Series[(1 - 4 x + 7 x^2 - 5 x^3 + 4 x^4 - 6 x^5 + 21 x^6 + 18 x^7 - 5 x^8)/(1 - x)^5, {x, 0, 38}], x]
  • PARI
    Vec((1-4*x+7*x^2-5*x^3+4*x^4-6*x^5+21*x^6+18*x^7-5*x^8)/(1-x)^5+O(x^39))
    

Formula

G.f.: (1-4*x+7*x^2-5*x^3+4*x^4-6*x^5+21*x^6+18*x^7-5*x^8)/(1-x)^5.
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5) for n>8, a(0)=a(1)=1, a(2)=2, a(3)=5, a(4)=14, a(5)=30, a(6)=72, a(7)=195, a(8)=485.
a(n) = (n-3)*(31*n^3-369*n^2+1454*n-1560)/24 for n>3, a(0)=a(1)=1, a(2)=2, a(3)=5.
G.f.: 1+x+2*x^2+5*x^3 + 14*x^4*G(0), where G(k)= 1 + x*(k+1)*(124*k^3+192*k^2+89*k+180)/( (2*k+1)*(62*k^3+3*k^2-5*k+84) - x*(2*k+1)*(62*k^3+3*k^2-5*k+84)*(2*k+3)*(62*k^3+189*k^2+187*k+144)/(x*(2*k+3)*(62*k^3+189*k^2+187*k+144) + (k+1)*(124*k^3+192*k^2+89*k+180)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 06 2013

A215796 Number of distinct values taken by 7th derivative of x^x^...^x (with n x's and parentheses inserted in all possible ways) at x=1.

Original entry on oeis.org

1, 1, 2, 4, 9, 20, 48, 115, 283, 691, 1681, 3988, 9241, 20681, 44217, 89644
Offset: 1

Views

Author

Alois P. Heinz, Aug 24 2012

Keywords

Examples

			a(4) = 4 because the A000108(3) = 5 possible parenthesizations of x^x^x^x lead to 4 different values of the 7th derivative at x=1: (x^(x^(x^x))) -> 26054; ((x^x)^(x^x)), ((x^(x^x))^x) -> 41090; (x^((x^x)^x)) -> 47110; (((x^x)^x)^x) -> 70098.
		

Crossrefs

Column k=7 of A216368.
Cf. A000081 (distinct functions), A000108 (parenthesizations), A000012 (first derivatives), A028310 (2nd derivatives), A199085 (3rd derivatives), A199205 (4th derivatives), A199296 (5th derivatives), A199883 (6th derivatives), A002845, A003018, A003019, A145545, A145546, A145547, A145548, A145549, A145550, A082499, A196244, A198683, A215703, A215837.

Programs

  • Maple
    T:= proc(n) T(n):=`if`(n=1, [x], map(h-> x^h, g(n-1$2))) end:
    g:= proc(n, i) option remember; `if`(i=1, [x^n], [seq(seq(
          seq(mul(T(i)[w[t]-t+1], t=1..j)*v, v=g(n-i*j, i-1)), w=
          combinat[choose]([$1..nops(T(i))+j-1], j)), j=0..n/i)])
        end:
    f:= proc() local i, l; i, l:= 0, []; proc(n) while n>
          nops(l) do i:= i+1; l:= [l[], T(i)[]] od; l[n] end
        end():
    a:= n-> nops({map(f-> 7!*coeff(series(subs(x=x+1, f), x, 8), x, 7), T(n))[]}):
    seq(a(n), n=1..12);

A237448 Square array T(row >= 1, col >= 1): The first row, row=1, T(1,col) = col = A000027. When row > col, T(row,col) = row, otherwise (when 1 < row <= col), T(row,col) = row-1.

Original entry on oeis.org

1, 2, 2, 3, 1, 3, 4, 1, 3, 4, 5, 1, 2, 4, 5, 6, 1, 2, 4, 5, 6, 7, 1, 2, 3, 5, 6, 7, 8, 1, 2, 3, 5, 6, 7, 8, 9, 1, 2, 3, 4, 6, 7, 8, 9, 10, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13
Offset: 1

Views

Author

Antti Karttunen, Feb 10 2014

Keywords

Comments

This is transpose of A237447, please see comments there.

Examples

			The top left 9 X 9 corner of this infinite square array:
  1 2 3 4 5 6 7 8 9
  2 1 1 1 1 1 1 1 1
  3 3 2 2 2 2 2 2 2
  4 4 4 3 3 3 3 3 3
  5 5 5 5 4 4 4 4 4
  6 6 6 6 6 5 5 5 5
  7 7 7 7 7 7 6 6 6
  8 8 8 8 8 8 8 7 7
  9 9 9 9 9 9 9 9 8
		

Crossrefs

Transpose: A237447.
The leftmost column and the topmost row: A000027. Second row: A054977. Central diagonal: A028310 (note the different starting offsets).
Antidiagonal sums: A074148.

Programs

Formula

As a one-dimensional sequence:
If A010054(n-1) = 1 [that is, if n is in A000124], then a(n) = A002024(n), otherwise, if A004736(n) < A002260(n), a(n) = A002260(n), and if A004736(n) >= A002260(n), a(n) = A002260(n)-1.
Equivalently, as a square array T:
When col < row, T(row,col) = row, for 1 < row <= col, T(row,col) = row-1, and for the first row T(1,col) = col = A000027(col).
Can be computed also as a transposed version of the infinite limit of the finite square arrays in sequence A237265: T(row,col) = A237265((A000330(max(row,col)-1)+1) + (max(row,col)*(col-1)) + (row-1)).

A255264 Total number of ON cells in the "Ulam-Warburton" two-dimensional cellular automaton of A147562 after A048645(n) generations.

Original entry on oeis.org

1, 5, 9, 21, 25, 37, 85, 89, 101, 149, 341, 345, 357, 405, 597, 1365, 1369, 1381, 1429, 1621, 2389, 5461, 5465, 5477, 5525, 5717, 6485, 9557, 21845, 21849, 21861, 21909, 22101, 22869, 25941, 38229, 87381, 87385, 87397, 87445, 87637
Offset: 1

Views

Author

Omar E. Pol, Feb 19 2015

Keywords

Comments

It appears that these are the terms of A147562, A162795, A169707, A255366, A256250, A256260, whose indices have binary weight 1 or 2.

Examples

			Also, written as an irregular triangle in which row lengths are the terms of A028310 the sequence begins:
      1;
      5;
      9,    21;
     25,    37,    85;
     89,   101,   149,   341;
    345,   357,   405,   597,  1365;
   1369,  1381,  1429,  1621,  2389,  5461;
   5465,  5477,  5525,  5717,  6485,  9557, 21845;
  21849, 21861, 21909, 22101, 22869, 25941, 38229, 87381;
  ...
Right border gives the positive terms of A002450.
It appears that the second leading diagonal gives the odd terms of A206374.
		

Crossrefs

Formula

a(n) = A147562(A048645(n)).
Conjecture 1: a(n) = A162795(A048645(n)).
Conjecture 2: a(n) = A169707(A048645(n)).
Conjecture 3: a(n) = A255366(A048645(n)).
Conjecture 4: a(n) = A256250(A048645(n)).
Conjecture 5: a(n) = A256260(A048645(n)).
a(n) = A032925(A209492(n-1)) (conjectured). - Jon Maiga, Dec 17 2021

A328902 Triangle T(n, k) read by rows: T(n, k) is the denominator of the rational Catalan number defined as binomial(n + k, n)/(n + k) for 0 <= k <= n, n > 0; T(0, 0) = 1.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Oct 30 2019

Keywords

Examples

			n\k| 0 1 2 3 4 5 6
---+--------------
0  | 1
1  | 1 1
2  | 2 1 2
3  | 3 1 1 3
4  | 4 1 2 1 4
5  | 5 1 1 1 1 5
6  | 6 1 2 3 1 1 1
...
		

Crossrefs

Cf. A000108, A028310 (1st column), A046899, A051162, A328901 (numerator).

Programs

  • Mathematica
    Flatten[Join[{1},Table[(n+k)/GCD[n+k,Binomial[n+k,n]],{n,1,12},{k,0,n}]]]
  • PARI
    A328902(n,k)=if(n,(n+k)/gcd(binomial(n+k,n),n+k),1) \\ M. F. Hasler, Nov 04 2019

Formula

T(n, k) = (n + k)/gcd(binomial(n + k, n), n + k) for n > 0.
Previous Showing 51-60 of 92 results. Next