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 11-19 of 19 results.

A007179 Dual pairs of integrals arising from reflection coefficients.

Original entry on oeis.org

0, 1, 1, 4, 6, 16, 28, 64, 120, 256, 496, 1024, 2016, 4096, 8128, 16384, 32640, 65536, 130816, 262144, 523776, 1048576, 2096128, 4194304, 8386560, 16777216, 33550336, 67108864, 134209536, 268435456, 536854528, 1073741824, 2147450880, 4294967296, 8589869056
Offset: 0

Views

Author

Keywords

Examples

			From _Gus Wiseman_, Feb 26 2022: (Start)
Also the number of integer compositions of n with at least one odd part. For example, the a(1) = 1 through a(5) = 16 compositions are:
  (1)  (1,1)  (3)      (1,3)      (5)
              (1,2)    (3,1)      (1,4)
              (2,1)    (1,1,2)    (2,3)
              (1,1,1)  (1,2,1)    (3,2)
                       (2,1,1)    (4,1)
                       (1,1,1,1)  (1,1,3)
                                  (1,2,2)
                                  (1,3,1)
                                  (2,1,2)
                                  (2,2,1)
                                  (3,1,1)
                                  (1,1,1,2)
                                  (1,1,2,1)
                                  (1,2,1,1)
                                  (2,1,1,1)
                                  (1,1,1,1,1)
(End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=2 of A309748.
Odd bisection is A000302.
Even bisection is A006516 = 2^(n-1)*(2^n - 1).
The complement is counted by A077957, internal version A027383.
The internal case is A274230, even bisection A134057.
A000045(n-1) counts compositions without odd parts, non-singleton A077896.
A003242 counts Carlitz compositions.
A011782 counts compositions.
A034871, A097805, and A345197 count compositions by alternating sum.
A052952 (or A074331) counts non-singleton compositions without even parts.

Programs

  • Magma
    [Floor(2^n/2-2^(n/2)*(1+(-1)^n)/4): n in [0..40]]; // Vincenzo Librandi, Aug 20 2011
    
  • Maple
    f := n-> if n mod 2 = 0 then 2^(n-1)-2^((n-2)/2) else 2^(n-1); fi;
  • Mathematica
    LinearRecurrence[{2,2,-4},{0,1,1},30] (* Harvey P. Dale, Nov 30 2015 *)
    Table[2^(n-1)-If[EvenQ[n],2^(n/2-1),0],{n,0,15}] (* Gus Wiseman, Feb 26 2022 *)
  • PARI
    Vec(x*(1-x)/((1-2*x)*(1-2*x^2)) + O(x^50)) \\ Michel Marcus, Jan 28 2016

Formula

From Paul Barry, Apr 28 2004: (Start)
Binomial transform is (A000244(n)+A001333(n))/2.
G.f.: x*(1-x)/((1-2*x)*(1-2*x^2)).
a(n) = 2*a(n-1)+2*a(n-2)-4*a(n-3).
a(n) = 2^n/2-2^(n/2)*(1+(-1)^n)/4. (End)
G.f.: (1+x*Q(0))*x/(1-x), where Q(k)= 1 - 1/(2^k - 2*x*2^(2*k)/(2*x*2^k - 1/(1 + 1/(2*2^k - 8*x*2^(2*k)/(4*x*2^k + 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 22 2013
a(n) = A011782(n+2) - A077957(n) - Gus Wiseman, Feb 26 2022

A342759 Fold a square sheet of paper alternately vertically to the left and horizontally downwards; after each fold, draw a line along each inward crease; after n folds, the resulting graph has a(n) regions.

Original entry on oeis.org

1, 2, 3, 4, 6, 10, 16, 25, 43, 73, 133, 241, 457, 865, 1681, 3265, 6433, 12673, 25153, 49921, 99457, 198145, 395521, 789505, 1577473, 3151873, 6300673, 12595201, 25184257, 50356225, 100700161
Offset: 0

Views

Author

Rémy Sigrist and N. J. A. Sloane, Mar 21 2021

Keywords

Comments

Take a square sheet of paper and fold it first vertically and then horizontally so that the bottom right corner stays in place. After each fold, unfold the paper and draw a line along each crease that is indented inwards (along which water would flow); upward creases (ridges) are not marked.
After two folds, we again have a (smaller and thicker) square, and we repeat the process.
After n individual folds, when the paper is unfolded the lines form a planar graph G(n). The numbers of regions, vertices, edges, and connected components in G(n) are given in the present sequence, A146528 (still to be confirmed), A342761, and A342762.
The number of vertices of degree 1 after n+1 folds appears to be A274230(n).
We ignore the folk theorem that says no sheet of paper can be folded more than seven times.

Examples

			See illustration in Links section.
		

References

  • Rémy Sigrist and N. J. A. Sloane, Notes on Two-Dimensional Paper-Folding, Manuscript in preparation, April 2021.

Crossrefs

A183978 1/4 the number of (n+1) X 2 binary arrays with all 2 X 2 subblock sums the same.

Original entry on oeis.org

4, 6, 9, 15, 25, 45, 81, 153, 289, 561, 1089, 2145, 4225, 8385, 16641, 33153, 66049, 131841, 263169, 525825, 1050625, 2100225, 4198401, 8394753, 16785409, 33566721, 67125249, 134242305, 268468225, 536920065, 1073807361, 2147581953, 4295098369
Offset: 1

Views

Author

R. H. Hardin, Jan 08 2011

Keywords

Comments

Column 1 of A183986
Based on the conjectured recursion formula, it is also the number of notches in a sheet of paper when you fold it n times and cut off the four corners (see A274230). - Philippe Gibone, Jul 06 2016

Examples

			Some solutions for 5X2
..0..1....1..0....1..0....1..1....0..1....1..0....1..0....0..1....0..1....0..1
..0..0....1..0....1..0....1..0....1..0....1..0....1..0....0..1....1..0....0..1
..1..0....1..0....0..1....1..1....0..1....0..1....0..1....1..0....0..1....1..0
..0..0....1..0....1..0....0..1....1..0....1..0....0..1....1..0....0..1....0..1
..1..0....1..0....1..0....1..1....1..0....0..1....0..1....1..0....1..0....0..1
		

Crossrefs

Cf. A274230.
Conjectured to be the main diagonal of A274636.

Programs

  • Maple
    seq((1+2^floor((n-1)/2))*(1+2^ceil((n-1)/2)), n=1..20); # Robert Israel, May 21 2019

Formula

Empirical: a(n) = 3*a(n-1) - 6*a(n-3) + 4*a(n-4)
Based on the conjectured recursion formula, we may prove (by a tedious induction) that a(n) = (2^ceiling(n/2) + 1) * (2^floor(n/2) + 1) = A051032(n) * A051032(n-1) for n >= 1. - Philippe Gibone, Jul 06 2016, corrected by Robert Israel, May 21 2019
Empirical: G.f.: -x*(4-6*x-9*x^2+12*x^3) / ( (x-1)*(2*x-1)*(2*x^2-1) ). - R. J. Mathar, Jul 15 2016
Empirical formulas verified (see link): Robert Israel, May 21 2019.
2*a(n) = 2+2^n+A029744(n+3). - R. J. Mathar, Jul 19 2024

A232580 Number of binary sequences of length n that contain at least one contiguous subsequence 011.

Original entry on oeis.org

0, 0, 0, 1, 4, 12, 31, 74, 168, 369, 792, 1672, 3487, 7206, 14788, 30185, 61356, 124308, 251199, 506578, 1019920, 2050785, 4119280, 8267216, 16580799, 33236622, 66594636, 133385689, 267089188, 534692604, 1070217247, 2141780762, 4285739832, 8575004241
Offset: 0

Views

Author

Geoffrey Critzer, Nov 26 2013

Keywords

Comments

From Gus Wiseman, Jun 26 2022: (Start)
Also the number of integer compositions of n + 1 with an even part other than the first or last. For example, the a(3) = 1 through a(5) = 12 compositions are:
(121) (122) (123)
(221) (141)
(1121) (222)
(1211) (321)
(1122)
(1212)
(1221)
(2121)
(2211)
(11121)
(11211)
(12111)
The odd version is A274230.
(End)

Examples

			a(4) = 4 because we have: 0011, 0110, 0111, 1011.
		

Crossrefs

The complement is counted by A000071(n) = A001911(n) + 1.
For the contiguous pattern (1,1) or (0,0) we have A000225.
For the contiguous pattern (1,0,1) or (0,1,0) we have A000253.
For the contiguous pattern (1,0) or (0,1) we have A000295.
Numbers whose binary expansion is of this type are A004750.
For the contiguous pattern (1,1,1) or (0,0,0) we have A050231.
The not necessarily contiguous version is A324172.

Programs

  • Mathematica
    nn=40;a=x/(1-x);CoefficientList[Series[a^2 x/(1-a x)/(1-2x),{x,0,nn}],x]
    (* second program *)
    Table[Length[Select[Tuples[{0,1},n],MatchQ[#,{_,0,1,1,_}]&]],{n,0,10}] (* Gus Wiseman, Jun 26 2022 *)
  • PARI
    concat(vector(3), Vec(x^3/(-2*x^4+x^3+4*x^2-4*x+1) + O(x^40))) \\ Colin Barker, Nov 03 2016

Formula

O.g.f.: x^3/( (1-x)^2*(1-x^2/(1-x))*(1-2x) ).
a(n) ~ 2^n.
From Colin Barker, Nov 03 2016: (Start)
a(n) = (1 + 2^n - (2^(-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5))))/sqrt(5)).
a(n) = 4*a(n-1) - 4*a(n-2) - a(n-3) + 2*a(n-4) for n > 3. (End)
a(n) = 2^n - Fibonacci(n+3) + 1. - Ehren Metcalfe, Dec 27 2018
E.g.f.: 2*exp(x/2)*(5*exp(x)*cosh(x/2) - 5*cosh(sqrt(5)*x/2) - 2*sqrt(5)*sinh(sqrt(5)*x/2))/5. - Stefano Spezia, Apr 06 2022

A350140 Nonsquarefree numbers whose prime signature has at least one odd part other the first or last.

Original entry on oeis.org

60, 84, 120, 132, 140, 150, 156, 168, 204, 220, 228, 240, 260, 264, 270, 276, 280, 294, 300, 308, 312, 315, 336, 340, 348, 364, 372, 378, 380, 408, 420, 440, 444, 456, 460, 476, 480, 490, 492, 495, 516, 520, 528, 532, 540, 552, 560, 564, 572, 580, 585, 588
Offset: 1

Views

Author

Gus Wiseman, Dec 25 2021

Keywords

Comments

A number's prime signature (row n of A124010) is the sequence of positive exponents in its prime factorization.
Also Heinz numbers of non-weakly alternating non-strict integer partitions, where we define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. These partitions are counted by A349796. This sequence involves the somewhat degenerate case where no strict increases are allowed.

Examples

			The terms together with their Heinz partitions begin (A-E = 10-14):
     60: (3211)      276: (9211)      420: (43211)
     84: (4211)      280: (43111)     440: (53111)
    120: (32111)     294: (4421)      444: (C211)
    132: (5211)      300: (33211)     456: (82111)
    140: (4311)      308: (5411)      460: (9311)
    150: (3321)      312: (62111)     476: (7411)
    156: (6211)      315: (4322)      480: (3211111)
    168: (42111)     336: (421111)    490: (4431)
    204: (7211)      340: (7311)      492: (D211)
    220: (5311)      348: (A211)      495: (5322)
    228: (8211)      364: (6411)      516: (E211)
    240: (321111)    372: (B211)      520: (63111)
    260: (6311)      378: (42221)     528: (521111)
    264: (52111)     380: (8311)      532: (8411)
    270: (32221)     408: (72111)     540: (322211)
		

Crossrefs

Including all nonsquarefree numbers gives A013929, complement A005117.
Subsets include A088860 and A110286.
Signatures of this type are counted by A274230, complement A027383.
The strict instead of non-strict version is A336568, counted by A347548.
A version for compositions allowing strict is A349057, counted by A349053.
Allowing strict partitions gives A349794, counted by A349061.
These partitions are counted by A349796.
The complement in nonsquarefree partitions is A350137, counted by A349795.
A000041 = integer partitions, strict A000009.
A001250 = alternating permutations, ranked by A349051, complement A348615.
A003242 = Carlitz (anti-run) compositions.
A025047/A025048/A025049 = alternating compositions, ranked by A345167.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
A096441 = weakly alternating 0-appended partitions.
A124010 = prime signature, sorted A118914.
A345164 = alternating permutations of prime indices, complement A350251.
A345170 = partitions w/ an alternating permutation, ranked by A345172.
A349052/A129852/A129853 = weakly alternating compositions.
A349056 = weakly alternating permutations of prime indices.
A349058 = weakly alternating patterns, complement A350138.
A349060 = weakly alternating partitions, strong A349801.
A349798 = weakly but not strongly alternating perms of prime indices.

Programs

  • Mathematica
    Select[Range[300],!SquareFreeQ[#]&&PrimeNu[#]>1&& !And@@EvenQ/@Take[Last/@FactorInteger[#],{2,-2}]&]

Formula

Complement of A005117 in A349794.

A274626 a(n) = Product_{i=0..2} (2^floor((n+i)/3)-1).

Original entry on oeis.org

0, 0, 0, 1, 3, 9, 27, 63, 147, 343, 735, 1575, 3375, 6975, 14415, 29791, 60543, 123039, 250047, 504063, 1016127, 2048383, 4112895, 8258175, 16581375, 33227775, 66585855, 133432831, 267126783, 534776319, 1070599167, 2142244863, 4286583807, 8577357823, 17158905855, 34326194175, 68669157375
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2016

Keywords

Comments

From Tom Karzes, Jul 05 2016: (Start)
This is a three-dimensional analog of the holes-in-sheet-of-paper sequence A274230.
In d dimensions, assuming the axes for folding are selected in a round-robin fashion, the number of times a given dimension is folded is:
floor((n+i)/d)
where i runs from 0 (for the last dimension to be folded) through d-1 (for the first dimension to be folded).
The corresponding number of internal dividing lines/planes/etc. is (2^floor((n+i)/d)-1). The number of internal d-way intersections, which corresponds to the number of holes, is:
Product_{i=0..d-1}(2^floor((n+i)/d)-1)
where d is the number of dimensions and n is the total number of folds.
Note that the first several nonzero entries in these sequences are the powers of 3. Specifically, in d dimensions, the first d entries are 0, followed by the first (d+1) powers of 3.
It's not hard to see why this is so. The first nonzero entry occurs at d folds, and the value is 1. This is when you've folded once along each dimension.
After that, the next d folds each divide 2 old partitions into 4 new ones, i.e., they change the internal folds from 1 to 3. So for the next d entries you just multiply the previous entry by 3 (or more generally, by 3/1).
After that you multiply by 7/3 for the next d entries, then 15/7, then 31/15, etc. Each time you're just replacing one of the old factors with a new one, where each factor is one less than a power of two.
Here's an alternative formulation that avoids the iterated product.
For a given number of folds, there are only two factors, each raised to some exponent (with the sum of the exponents being the dimension d):
v1 = 2^(n/d)-1
v2 = 2^(n/d+1)-1
p1 = d-mod(n,d)
p2 = mod(n,d)
holes = (v1^p1)*(v2^p2)
This flattens to:
((2^(n/d)-1)^(d-mod(n,d))) * ((2^(n/d+1)-1)^(mod(n,d)))
(End)

References

  • Tom Karzes, Posting to Math Fun Mailing List, Jul 05 2016.

Crossrefs

Programs

  • Maple
    f:=(n,d) ->  mul(2^floor((n+i)/d)-1, i = 0 .. d-1);
    [seq(f(n,3),n=0..40)];
  • Mathematica
    Table[Product[(2^Floor[(n+i)/3]-1),{i,0,2}],{n,0,40}] (* Harvey P. Dale, Jun 29 2025 *)
  • PARI
    a(n) = prod(i=0, 2, 2^floor((n+i)/3)-1) \\ Colin Barker, Jul 06 2016

Formula

Empirical g.f.: x^3*(1+2*x^2) / ((1-x)*(1-2*x)*(1-2*x^3)*(1-4*x^3)). - Colin Barker, Jul 06 2016

A274635 Square array read by antidiagonals: T(m,n) (m>=0, n>=0) = (2^floor(m/2)-1)*(2^ceiling(n/2)-1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 3, 1, 3, 0, 0, 0, 3, 3, 3, 3, 0, 0, 0, 7, 3, 9, 3, 7, 0, 0, 0, 7, 7, 9, 9, 7, 7, 0, 0, 0, 15, 7, 21, 9, 21, 7, 15, 0, 0, 0, 15, 15, 21, 21, 21, 21, 15, 15, 0, 0, 0, 31, 15, 45, 21, 49, 21, 45, 15, 31, 0, 0, 0, 31, 31, 45, 45, 49, 49, 45, 45, 31, 31, 0
Offset: 0

Views

Author

N. J. A. Sloane, Jul 08 2016

Keywords

Examples

			The array begins:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
0, 1, 1, 3, 3, 7, 7, 15, 15, 31, 31, 63, 63, ...
0, 1, 1, 3, 3, 7, 7, 15, 15, 31, 31, 63, 63, ...
0, 3, 3, 9, 9, 21, 21, 45, 45, 93, 93, 189, 189, ...
0, 3, 3, 9, 9, 21, 21, 45, 45, 93, 93, 189, 189, ...
0, 7, 7, 21, 21, 49, 49, 105, 105, 217, 217, 441, 441, ...
...
		

Crossrefs

The main diagonal is A274230. Cf. A274636.

A274627 Product_{i=0..3} (2^floor((n+i)/4)-1).

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 9, 27, 81, 189, 441, 1029, 2401, 5145, 11025, 23625, 50625, 104625, 216225, 446865, 923521, 1876833, 3814209, 7751457, 15752961, 31755969, 64016001, 129048129, 260144641, 522337665, 1048788225, 2105834625, 4228250625, 8473082625, 16979393025, 34025371905, 68184176641
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2016

Keywords

Comments

This is a four-dimensional analog of the holes-in-sheet-of-paper sequence A274230. See A274230 and A274626 for further information.

References

  • Tom Karzes, Posting to Math Fun Mailing List, Jul 05 2016.

Crossrefs

Programs

  • Maple
    f:=(n,d) -> mul(2^floor((n+i)/d)-1, i = 0 .. d-1);
    [seq(f(n,4),n=0..40)];
  • PARI
    a(n) = prod(i=0, 3, 2^floor((n+i)/4)-1) \\ Colin Barker, Jul 06 2016

Formula

Empirical g.f.: x^4*(1+2*x^2+6*x^3+4*x^4+8*x^6) / ((1-x)*(1-2*x)*(1-2*x^2)*(1+2*x^2)*(1-2*x^4)*(1-8*x^4)). - Colin Barker, Jul 06 2016

A357284 a(n) = (1/2)*A357283(n).

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 13, 34, 83, 188, 413, 878, 1839, 3792, 7761, 15762, 31891, 64276, 129301, 259606, 520727, 1043480, 2090009, 4184090, 8374299, 16756764, 33525789, 67067934, 134160415, 268353568, 536756257, 1073578018, 2147254307, 4294639652, 8589475877
Offset: 0

Views

Author

Clark Kimberling, Sep 27 2022

Keywords

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = Select[Subsets[Range[n]], Length[#] >= 2 &];  (* note size >=2 *)
    a[n_] := Select[s[n], #[[2]] + #[[1]] < #[[-1]] &]
    (1/2)Table[Length[a[n]], {n, 0, 18}]

Formula

a(n) = 4*a(n-1) - 3*a(n-2) - 6*a(n-3) + 10*a(n-4) - 4*a(n-5).
G.f.: (x^4)/((-1 + x)^2 (1 - 2 x - 2 x^2 + 4 x^3)).
a(n) = Sum_{i=0..n-2} A274230(i). - Ivan N. Ianakiev, Nov 08 2022
Previous Showing 11-19 of 19 results.