A325698
Numbers with as many even as odd prime indices, counted with multiplicity.
Original entry on oeis.org
1, 6, 14, 15, 26, 33, 35, 36, 38, 51, 58, 65, 69, 74, 77, 84, 86, 90, 93, 95, 106, 119, 122, 123, 141, 142, 143, 145, 156, 158, 161, 177, 178, 185, 196, 198, 201, 202, 209, 210, 214, 215, 216, 217, 219, 221, 225, 226, 228, 249, 262, 265, 278, 287, 291, 299
Offset: 1
The sequence of terms together with their prime indices begins:
1: {}
6: {1,2}
14: {1,4}
15: {2,3}
26: {1,6}
33: {2,5}
35: {3,4}
36: {1,1,2,2}
38: {1,8}
51: {2,7}
58: {1,10}
65: {3,6}
69: {2,9}
74: {1,12}
77: {4,5}
84: {1,1,2,4}
86: {1,14}
90: {1,2,2,3}
93: {2,11}
95: {3,8}
Cf.
A000712,
A001222,
A001405,
A006094,
A026010,
A045931,
A063886,
A097613,
A112798,
A130780,
A171966,
A239241,
A241638,
A325700.
-
Select[Range[100],Total[Cases[If[#==1,{},FactorInteger[#]],{p_,k_}:>k*(-1)^PrimePi[p]]]==0&]
-
is(n) = {my(v = vector(2), f = factor(n));for(i = 1, #f~,v[1 + primepi(f[i, 1])%2]+=f[i, 2]);v[1] == v[2]} \\ David A. Corneth, Oct 06 2020
-
from sympy import factorint, primepi
def ok(n):
v = [0, 0]
for p, e in factorint(n).items(): v[primepi(p)%2] += e
return v[0] == v[1]
print([k for k in range(300) if ok(k)]) # Michael S. Branicky, Apr 16 2022 after David A. Corneth
A063886
Number of n-step walks on a line starting from the origin but not returning to it.
Original entry on oeis.org
1, 2, 2, 4, 6, 12, 20, 40, 70, 140, 252, 504, 924, 1848, 3432, 6864, 12870, 25740, 48620, 97240, 184756, 369512, 705432, 1410864, 2704156, 5408312, 10400600, 20801200, 40116600, 80233200, 155117520, 310235040, 601080390, 1202160780, 2333606220, 4667212440
Offset: 0
a(4) = 6 because there are six length four walks that do not return to the origin: {-1, -2, -3, -4}, {-1, -2, -3, -2}, {-1, -2, -1, -2}, {1, 2, 1, 2}, {1, 2, 3, 2}, {1, 2, 3, 4}. There are also six such walks that return exactly one time: {-1, -2, -1, 0}, {-1, 0, -1, -2}, {-1, 0, 1, 2}, {1, 0, -1, -2}, {1, 0, 1, 2}, {1, 2, 1, 0}. - _Geoffrey Critzer_, Jan 24 2010
The a(5) = 12 subsets in which the even elements appear as often at even positions as at odd positions: {}, {1}, {3}, {5}, {1,3}, {1,5}, {2,4}, {3,5}, {1,2,4}, {1,3,5}, {2,4,5}, {1,2,4,5}. - _Gus Wiseman_, Mar 17 2018
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Paul Barry, A Note on Riordan Arrays with Catalan Halves, arXiv:1912.01124 [math.CO], 2019.
- Emeric Deutsch, Problem 11424, The American Mathematical Monthly, Vol. 116, No. 3 (March 2009), p. 277.
- D. Perrin, A conjecture on rational sequences, pp. 267-274 of R. M. Capocelli, ed., Sequences, Springer-Verlag, NY 1990.
Apart from initial terms, same as
A182027.
Cf.
A000108,
A000246,
A000712,
A000984,
A001405,
A001700,
A002420,
A006232,
A007877,
A026010,
A028329,
A045931,
A047073,
A089849,
A097613,
A106180,
A120617,
A130777,
A130780,
A138364,
A164584,
A171966,
A239241,
A300787,
A300788,
A300789.
-
[1] cat [2*Binomial(n-1, Floor((n-1)/2)): n in [1..40]]; // G. C. Greubel, Jun 07 2023
-
seq(seq(binomial(2*j,j)*i, i=1..2),j=0..16); # Zerinvary Lajos, Apr 28 2007
# second Maple program:
a:= proc(n) option remember; `if`(n<2, n+1,
4*a(n-2) +2*(a(n-1) -4*a(n-2))/n)
end:
seq(a(n), n=0..40); # Alois P. Heinz, Feb 10 2014
# third program:
A063886 := series(BesselI(0, 2*x)*(1 + x*2 + x*Pi*StruveL(1, 2*x)) - Pi*x*BesselI(1, 2*x)*StruveL(0, 2*x), x = 0, 34): seq(n!*coeff(A063886, x, n), n = 0 .. 33); # Mélika Tebni, Jun 17 2024
-
Table[Length[Select[Map[Accumulate, Strings[{-1, 1}, n]], Count[ #, 0] == 0 &]], {n, 0, 20}] (* Geoffrey Critzer, Jan 24 2010 *)
CoefficientList[Series[Sqrt[(1+2x)/(1-2x)],{x,0,40}],x] (* Harvey P. Dale, Apr 28 2016 *)
-
a(n)=(n==0)+2*binomial(n-1,(n-1)\2)
-
a(n) = 2^n*prod(k=0,n-1,(k/n+1/n)^((-1)^k)); \\ Michel Marcus, Dec 03 2013
-
from math import ceil
from sympy import binomial
def a(n):
if n==0: return 1
return 2*binomial(n-1,(n-1)//2)
print([a(n) for n in range(18)])
# David Nacin, Feb 29 2012
-
[2*binomial(n-1, (n-1)//2) + int(n==0) for n in range(41)] # G. C. Greubel, Jun 07 2023
A325700
Numbers with as many distinct even as distinct odd prime indices.
Original entry on oeis.org
1, 6, 12, 14, 15, 18, 24, 26, 28, 33, 35, 36, 38, 45, 48, 51, 52, 54, 56, 58, 65, 69, 72, 74, 75, 76, 77, 86, 93, 95, 96, 98, 99, 104, 106, 108, 112, 116, 119, 122, 123, 135, 141, 142, 143, 144, 145, 148, 152, 153, 158, 161, 162, 172, 175, 177, 178, 185, 192
Offset: 1
The sequence of terms together with their prime indices begins:
1: {}
6: {1,2}
12: {1,1,2}
14: {1,4}
15: {2,3}
18: {1,2,2}
24: {1,1,1,2}
26: {1,6}
28: {1,1,4}
33: {2,5}
35: {3,4}
36: {1,1,2,2}
38: {1,8}
45: {2,2,3}
48: {1,1,1,1,2}
51: {2,7}
52: {1,1,6}
54: {1,2,2,2}
56: {1,1,1,4}
58: {1,10}
Cf.
A001221,
A026010,
A028260,
A045931,
A063886,
A097613,
A112798,
A130780,
A239241,
A241638,
A325698,
A325699.
A097613
a(n) = binomial(2n-3,n-1) + binomial(2n-2,n-2).
Original entry on oeis.org
1, 2, 7, 25, 91, 336, 1254, 4719, 17875, 68068, 260338, 999362, 3848222, 14858000, 57500460, 222981435, 866262915, 3370764540, 13135064250, 51250632510, 200205672810, 782920544640, 3064665881940, 12007086477750, 47081501377326, 184753963255176, 725510446350004
Offset: 1
a(2) = 2 because UUDDUD and UDUUDD each have maximum pyramid size = 2.
- Michael De Vlieger, Table of n, a(n) for n = 1..1664
- Paul Barry, Extensions of Riordan Arrays and Their Applications, Mathematics (2025) Vol. 13, No. 2, 242. See p. 16.
- Gi-Sang Cheon, Hana Kim, and Louis W. Shapiro, Mutation effects in ordered trees, arXiv preprint arXiv:1410.1249 [math.CO], 2014.
- Milan Janjic, Two Enumerative Functions
- Toufik Mansour and I. L. Ramirez, Enumerations of polyominoes determined by Fuss-Catalan words, Australas. J. Combin. 81 (3) (2021) 447-457, table 2.
- Lin Yang and Shengliang Yang, Protected Branches in Ordered Trees, J. Math. Study (2023) Vol. 56, No. 1, 1-17.
Same as
A024482 except for first term.
-
Flat(List([1..30], n->Binomial(2*n-3, n-1)+Binomial(2*n-2, n-2))); # Stefano Spezia, Oct 27 2018
-
a097613 n = a209561 (2 * n - 1) n -- Reinhard Zumkeller, Dec 26 2012
-
[((3*n-2)*Catalan(n-1)+0^(n-1))/2: n in [1..40]]; // G. C. Greubel, Apr 04 2024
-
Z:=(1-z-sqrt(1-4*z))/sqrt(1-4*z)/2: Zser:=series(Z, z=0, 32): seq (ceil(coeff(Zser, z, n)), n=1..22); # Zerinvary Lajos, Jan 16 2007
a := n -> `if`(n=1, 1, (2-3*n)/(4-8*n)*binomial(2*n, n)):
seq(a(n), n=1..27); # Peter Luschny, Sep 06 2014
-
a[1]=1; a[n_] := (3n-2)(2n-3)!/(n!(n-2)!); Array[a, 27] (* Jean-François Alcover, Oct 27 2018 *)
-
a(n)=binomial(2*n-3,n-1)+binomial(2*n-2,n-2) \\ Charles R Greathouse IV, Aug 05 2013
-
@CachedFunction
def A097613(n):
if n < 3: return n
return (6*n-4)*(2*n-3)*A097613(n-1)/(n*(3*n-5))
[A097613(n) for n in (1..27)] # Peter Luschny, Sep 06 2014
A274230
Number of holes in a sheet of paper when you fold it n times and cut off the four corners.
Original entry on oeis.org
0, 0, 1, 3, 9, 21, 49, 105, 225, 465, 961, 1953, 3969, 8001, 16129, 32385, 65025, 130305, 261121, 522753, 1046529, 2094081, 4190209, 8382465, 16769025, 33542145, 67092481, 134193153, 268402689, 536821761, 1073676289, 2147385345
Offset: 0
- Paolo P. Lava, Table of n, a(n) for n = 0..1000
- Philippe Gibone, Illustration of a(0)-a(4) (idealized).
- Talmon Silver, Illustration of alternating dragon.
- N. J. A. Sloane, Illustration for a(4) = 9 (scan of an actual cut-up piece of paper)
- N. J. A. Sloane, Illustration for a(5) = 21 (scan of an actual cut-up piece of paper)
- Index entries for linear recurrences with constant coefficients, signature (3,0,-6,4).
This is the main diagonal of
A274635.
Counting fold lines instead of holes gives
A027383.
Cf.
A000712,
A001405,
A008549,
A011782,
A026010,
A052955,
A097613,
A126869,
A138364,
A232580,
A351003.
A026009
Triangular array T read by rows: T(n,0) = 1 for n >= 0; T(1,1) = 1; and for n >= 2, T(n,k) = T(n-1,k-1) + T(n-1,k) for k = 1,2,...,[(n+1)/2]; T(n,n/2 + 1) = T(n-1,n/2) if n is even.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 4, 6, 3, 1, 5, 10, 9, 1, 6, 15, 19, 9, 1, 7, 21, 34, 28, 1, 8, 28, 55, 62, 28, 1, 9, 36, 83, 117, 90, 1, 10, 45, 119, 200, 207, 90, 1, 11, 55, 164, 319, 407, 297, 1, 12, 66, 219, 483, 726, 704, 297, 1, 13, 78, 285, 702, 1209, 1430, 1001, 1, 14, 91, 363, 987, 1911, 2639, 2431, 1001
Offset: 0
From _Jonathon Kirkpatrick_, Jul 01 2016: (Start)
Triangle begins:
1;
1, 1;
1, 2, 1;
1, 3, 3;
1, 4, 6, 3;
1, 5, 10, 9;
1, 6, 15, 19, 9;
1, 7, 21, 34, 28;
1, 8, 28, 55, 62, 28;
1, 9, 36, 83, 117, 90;
1, 10, 45, 119, 200, 207, 90;
1, 11, 55, 164, 319, 407, 297;
1, 12, 66, 219, 483, 726, 704, 297;
1, 13, 78, 285, 702, 1209, 1430, 1001;
... (End)
Diagonals of this sequence:
A000217,
A000245,
A026012,
A026013,
A026014,
A026015,
A026016,
A026017,
A026018,
A026019,
A026020,
A026021.
-
[1] cat [Binomial(n,k) - Binomial(n,k-3): k in [0..Floor((n+2)/2)], n in [1..15]]; // G. C. Greubel, Mar 18 2021
-
T[n_, k_]:= Binomial[n, k] - Binomial[n, k-3];
Join[{1}, Table[T[n, k], {n,14}, {k,0,Floor[(n+2)/2]}]//Flatten] (* G. C. Greubel, Mar 18 2021 *)
-
[1]+flatten([[binomial(n,k) - binomial(n,k-3) for k in (0..(n+2)//2)] for n in (1..15)]) # G. C. Greubel, Mar 18 2021
A005774
Number of directed animals of size n (k=1 column of A038622); number of (s(0), s(1), ..., s(n)) such that s(i) is a nonnegative integer and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, where s(0) = 2; also sum of row n+1 of array T in A026323.
Original entry on oeis.org
0, 1, 3, 9, 26, 75, 216, 623, 1800, 5211, 15115, 43923, 127854, 372749, 1088283, 3181545, 9312312, 27287091, 80038449, 234988827, 690513030, 2030695569, 5976418602, 17601021837, 51869858544, 152951628725, 451271872701, 1332147482253
Offset: 0
G.f.: x + 3*x^2 + 9*x^3 + 26*x^4 + 75*x^5 + 216*x^6 + 623*x^7 + ...
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- P. Barry, Riordan arrays, generalized Narayana triangles, and series reversion, Linear Algebra and its Applications, 491 (2016) 343-385.
- D. Gouyou-Beauchamps, G. Viennot, Equivalence of the two-dimensional directed animal problem to a one-dimensional path problem, Adv. in Appl. Math. 9 (1988), no. 3, 334-357.
- Christian Krattenthaler, Daniel Yaqubi, Some determinants of path generating functions, II, arXiv:1802.05990 [math.CO], 2018; Adv. Appl. Math. 101 (2018), 232-265.
- Simon Plouffe, Approximations de Séries Génératrices et Quelques Conjectures, Dissertation, Université du Québec à Montréal, 1992.
- Simon Plouffe, Une méthode pour obtenir la fonction génératrice d'une série, FPSAC 1993, Florence. Formal Power Series and Algebraic Combinatorics.
-
a005774 0 = 0
a005774 n = a038622 n 1 -- Reinhard Zumkeller, Feb 26 2013
-
seq( add(binomial(i,k+1)*binomial(i-k,k), k=0..floor(i/2)), i=0..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
seq(simplify(GegenbauerC(n-2,-n,-1/2) + GegenbauerC(n-1,-n,-1/2)), n=0..27); # Peter Luschny, May 12 2016
-
CoefficientList[Series[(1-x-Sqrt[1-2x-3x^2])/(x(1-3x+Sqrt[1-2x-3x^2])),{x,0,30}],x] (* Harvey P. Dale, Sep 20 2011 *)
RecurrenceTable[{a[0]==0, a[1]==1,a[n]==(2n(n+1)a[n-1]+3n(n-1)a[n-2])/ ((n+2)(n-1))},a,{n,30}] (* Harvey P. Dale, Nov 09 2012 *)
-
s=[0,1]; {A005774(n)=k=(2*(n+2)*(n+1)*s[2]+3*(n+1)*n*s[1])/((n+3)*n); s[1]=s[2]; s[2]=k; k}
-
{a(n) = if( n<2, n>0, (2 * (n+1) * n *a(n-1) + 3 * (n-1) * n * a(n-2)) / (n+2) / (n-1))}; /* Michael Somos, May 01 2003 */
A300788
Number of strict integer partitions of n in which the even parts appear as often at even positions as at odd positions.
Original entry on oeis.org
1, 1, 0, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 19, 23, 26, 30, 35, 42, 47, 54, 62, 73, 82, 94, 107, 124, 139, 158, 179, 206, 230, 260, 293, 334, 372, 420, 470, 532, 591, 664, 740, 835, 924, 1034, 1148, 1288, 1422, 1588, 1756, 1962, 2161, 2404
Offset: 0
The a(9) = 3 strict partitions: (9), (621), (531). Missing are: (81), (72), (63), (54), (432).
Cf.
A000712,
A000898,
A001405,
A026010,
A045931,
A063886,
A097613,
A130780,
A171966,
A239241,
A300787,
A300789.
-
cobal[y_]:=Sum[(-1)^x,{x,Join@@Position[y,_?EvenQ]}];
Table[Length[Select[IntegerPartitions[n],cobal[#]===0&&UnsameQ@@#&]],{n,0,40}]
A240608
Number A(n,k) of n-length words w over a k-ary alphabet such that w is empty or a prefix z concatenated with letter a_i and i=1 or 0 < #(z,a_{i-1}) >= #(z,a_i), where #(z,a_i) counts the occurrences of the i-th letter in z; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 4, 1, 0, 1, 1, 2, 5, 7, 1, 0, 1, 1, 2, 5, 13, 14, 1, 0, 1, 1, 2, 5, 14, 35, 25, 1, 0, 1, 1, 2, 5, 14, 45, 94, 50, 1, 0, 1, 1, 2, 5, 14, 46, 149, 254, 91, 1, 0, 1, 1, 2, 5, 14, 46, 164, 509, 688, 182, 1, 0, 1, 1, 2, 5, 14, 46, 165, 629, 1756, 1872, 336, 1, 0
Offset: 0
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
0, 1, 1, 1, 1, 1, 1, 1, 1, ...
0, 1, 2, 2, 2, 2, 2, 2, 2, ...
0, 1, 4, 5, 5, 5, 5, 5, 5, ...
0, 1, 7, 13, 14, 14, 14, 14, 14, ...
0, 1, 14, 35, 45, 46, 46, 46, 46, ...
0, 1, 25, 94, 149, 164, 165, 165, 165, ...
0, 1, 50, 254, 509, 629, 650, 651, 651, ...
0, 1, 91, 688, 1756, 2511, 2742, 2770, 2771, ...
Columns k=0-10 give:
A000007,
A000012,
A026010(n-1) for n>0,
A240609,
A240610,
A240611,
A240612,
A240613,
A240614,
A240615,
A240616.
-
b:= proc(n, k, l) option remember; `if`(n=0, 1, `if`(nops(l) b(n, min(k, n), []):
seq(seq(A(n, d-n), n=0..d), d=0..14);
-
b[n_, k_, l_List] := b[n, k, l] = If[n == 0, 1, If[Length[l] l[[i]]+1]], 0], {i, 1, Length[l]}]]; A[n_, k_] := b[n, Min[k, n], {}]; Table[ Table[A[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Jan 19 2015, after Alois P. Heinz *)
A300787
Number of integer partitions of n in which the even parts appear as often at even positions as at odd positions.
Original entry on oeis.org
1, 1, 1, 2, 3, 4, 6, 8, 12, 15, 21, 27, 38, 47, 63, 79, 106, 130, 170, 209, 272, 330, 422, 512, 653, 784, 986, 1183, 1482, 1765, 2191, 2604, 3218, 3804, 4666, 5504, 6726, 7898, 9592, 11240, 13602, 15880, 19122, 22277, 26733, 31048, 37102, 43003, 51232, 59220
Offset: 0
The a(7) = 8 partitions: (7), (511), (421), (331), (322), (31111), (22111), (1111111). Missing are: (61), (52), (43), (4111), (3211), (2221), (211111).
Cf.
A000898,
A001405,
A026010,
A045931,
A058696,
A063886,
A097613,
A130780,
A171966,
A239241,
A300788,
A300789.
-
cobal[y_]:=Sum[(-1)^x,{x,Join@@Position[y,_?EvenQ]}];
Table[Length[Select[IntegerPartitions[n],cobal[#]===0&]],{n,0,50}]
Showing 1-10 of 15 results.
Comments