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 21-30 of 30 results.

A369464 Numbers for which there is no representation as a sum (p*q + p*r + q*r) with three odd primes p <= q <= r.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 88
Offset: 1

Views

Author

Antti Karttunen, Jan 24 2024

Keywords

Crossrefs

Complement of A369251. Numbers not in A369252.
Union of A004773 and A369056.
Positions of 0's in A369054.
Cf. A098700, A369248, A369249, A369463 (subsequences).

Programs

  • PARI
    isA369251(n) = if(3!=(n%4),0, my(v = [3,3], ip = #v, r); while(1, r = (n-(v[1]*v[2])) / (v[1]+v[2]); if(r < v[2], ip--, ip = #v; if(1==denominator(r) && isprime(r), return(1))); if(!ip, return(0)); v[ip] = nextprime(1+v[ip]); for(i=1+ip,#v,v[i]=v[i-1])));
    isA369464(n) = !isA369251(n);

A189785 a(n) = n+floor(n*r/s)+floor(nt/s); r=Pi/2, s=arcsin(5/13), t=arcsin(12/13).

Original entry on oeis.org

6, 14, 22, 30, 38, 46, 54, 62, 70, 78, 86, 94, 102, 110, 118, 126, 134, 142, 150, 158, 166, 174, 182, 190, 198, 206, 214, 222, 230, 238, 246, 254, 262, 270, 278, 286, 294, 302, 310, 318, 326, 334, 342, 350, 358, 366, 374, 380, 388, 396, 404, 412, 420, 428, 436, 444, 452, 460, 468, 476, 484, 492, 500, 508, 516, 524, 532, 540, 548
Offset: 1

Views

Author

Clark Kimberling, Apr 27 2011

Keywords

Comments

This is one of three sequences that partition the positive integers. In general, suppose that r, s, t are positive real numbers for which the sets {i/r: i>=1}, {j/s: j>=1}, {k/t: k>=1} are pairwise disjoint. Let a(n) be the rank of n/r when all the numbers in the three sets are jointly ranked. Define b(n) and c(n) as the ranks of n/s and n/t. It is easy to prove that
a(n)=n+[ns/r]+[nt/r],
b(n)=n+[nr/s]+[nt/s],
c(n)=n+[nr/t]+[ns/t], where []=floor.
Taking r=Pi/2, s=arcsin(5/13), t=arcsin(12/13) gives
a=A005408, b=A189785, c=A189786. Note that r=s+t.
a(n) first differs from A017137(n-1) at n=48 (a(48)=380 but A017137(47)=382). - Nathaniel Johnston, May 16 2011

Crossrefs

Programs

  • Mathematica
    r=Pi/2; s=ArcSin[5/13]; t=ArcSin[12/13];
    a[n_] := n + Floor[n*s/r] + Floor[n*t/r];
    b[n_] := n + Floor[n*r/s] + Floor[n*t/s];
    c[n_] := n + Floor[n*r/t] + Floor[n*s/t];
    Table[a[n], {n, 1, 120}]  (*A005408*)
    Table[b[n], {n, 1, 120}]  (*A189785*)
    Table[c[n], {n, 1, 120}]  (*A189786*)
    Table[b[n]/2, {n, 1, 120}]  (*A189787*)
    Table[c[n]/2, {n, 1, 120}]  (*A004773*)

A319949 a(n) = Product_{i=1..n} floor(4*i/3).

Original entry on oeis.org

1, 2, 8, 40, 240, 1920, 17280, 172800, 2073600, 26956800, 377395200, 6038323200, 102651494400, 1847726899200, 36954537984000, 776045297664000, 17072996548608000, 409751917166592000, 10243797929164800000, 266338746158284800000
Offset: 1

Views

Author

Vaclav Kotesovec, Oct 02 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Product[Floor[i*4/3], {i, 1, n}], {n, 1, 20}]
    RecurrenceTable[{27*(3*n - 7)*a[n] == 54*(2*n - 5)*a[n-1] + 12*(12*n^2 - 42*n + 35)*a[n-2] + 8*(n-2)*(2*n - 5)*(3*n - 4)*(4*n - 9)*a[n-3], a[1]==1, a[2]==2, a[3]==8}, a, {n, 1, 20}]
    FoldList[Times,Floor[4 Range[20]/3]] (* Harvey P. Dale, Mar 21 2024 *)
  • PARI
    a(n) = prod(i=1, n, (4*i)\3); \\ Michel Marcus, Oct 03 2018

Formula

a(n) ~ (4/3)^n * n! * 2*sqrt(Pi) / (3^(1/4) * Gamma(1/4) * n^(1/4)).
Recurrence: 27*(3*n - 7)*a(n) = 54*(2*n - 5)*a(n-1) + 12*(12*n^2 - 42*n + 35)*a(n-2) + 8*(n-2)*(2*n - 5)*(3*n - 4)*(4*n - 9)*a(n-3).

A104401 a(n) = A104235(n)/4.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, 26, 28, 29, 30, 32, 33, 34, 36, 37, 38, 40, 41, 42, 44, 45, 46, 48, 49, 50, 52, 53, 54, 56, 57, 58, 60, 61, 64, 65, 66, 68, 69, 70, 72, 73, 74, 76, 77, 78
Offset: 0

Views

Author

N. J. A. Sloane, Apr 18 2005

Keywords

Comments

First differs from A004773(n)=floor(4n/3) at a(47)=64 vs A004773(47)=62. - M. F. Hasler, Oct 05 2014

Crossrefs

A260113 Maximum number of queens on an n X n chessboard such that no queen attacks more than one other queen.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, 26, 28, 29, 30, 32, 33, 34, 36, 37, 38, 40
Offset: 1

Views

Author

Rob Pratt, Jul 16 2015

Keywords

Comments

Can be formulated as an integer linear programming problem as follows. Define a graph with a node for each cell and an edge for each pair of cells that are a queen's move apart. Let binary variable x[i] = 1 if a queen appears at node i, and 0 otherwise. The objective is to maximize sum x[i]. Let N[i] be the set of neighbors of node i. To enforce the rule that x[i] = 1 implies sum {j in N[i]} x[j] <= 1, impose the linear constraint sum {j in N[i]} x[j] - 1 <= (|N[i]| - 1) * (1 - x[i]) for each i.
An alternative formulation uses constraints x[i] + x[j] + x[k] <= 2 for each forbidden triple of nodes.
Taking into account known values, it is reasonable to conjecture that a(n) = floor(4*n/3) for n > 5. - Giovanni Resta, Aug 07 2015.
a(n) = floor(4*n/3) for large n. - Géza Makay, Dec 13 2024

Examples

			a(8) = 10:
  X-------
  ----XX--
  -X------
  -X------
  ------X-
  ------X-
  --XX----
  X-------
		

Crossrefs

A260090 is the corresponding sequence for kings.
Cf. A004773 (after Resta).

Formula

Ponder This solution page shows a(6n) = 8n.

Extensions

a(16)-a(30) from Giovanni Resta, Aug 07 2015

A345118 a(n) is the sum of the lengths of all the segments used to draw a square of side n representing a basketweave pattern where all the multiple strands are of unit width, the horizontal ones appearing as 1 X 3 rectangles, while the vertical ones as unit area squares.

Original entry on oeis.org

0, 4, 11, 20, 34, 50, 69, 92, 116, 144, 175, 208, 246, 286, 329, 376, 424, 476, 531, 588, 650, 714, 781, 852, 924, 1000, 1079, 1160, 1246, 1334, 1425, 1520, 1616, 1716, 1819, 1924, 2034, 2146, 2261, 2380, 2500, 2624, 2751, 2880, 3014, 3150, 3289, 3432, 3576, 3724
Offset: 0

Views

Author

Stefano Spezia, Jun 08 2021

Keywords

Examples

			Illustrations for n = 1..8:
        _           _ _          _ _ _
       |_|         |_|_|        |_ _ _|
                   |_ _|        |_|_|_|
                                |_ _ _|
    a(1) = 4     a(2) = 11     a(3) = 20
     _ _ _ _     _ _ _ _ _    _ _ _ _ _ _
    |_ _|_|_|   |_ _|_|_ _|  |_|_|_ _ _|_|
    |_|_ _ _|   |_|_ _ _|_|  |_ _ _|_|_ _|
    |_ _|_|_|   |_ _|_|_ _|  |_|_|_ _ _|_|
    |_|_ _ _|   |_|_ _ _|_|  |_ _ _|_|_ _|
                |_ _|_|_ _|  |_|_|_ _ _|_|
                             |_ _ _|_|_ _|
    a(4) = 34    a(5) = 50     a(6) = 69
      _ _ _ _ _ _ _      _ _ _ _ _ _ _ _
     |_|_|_ _ _|_|_|    |_ _|_|_ _ _|_|_|
     |_ _ _|_|_ _ _|    |_|_ _ _|_|_ _ _|
     |_|_|_ _ _|_|_|    |_ _|_|_ _ _|_|_|
     |_ _ _|_|_ _ _|    |_|_ _ _|_|_ _ _|
     |_|_|_ _ _|_|_|    |_ _|_|_ _ _|_|_|
     |_ _ _|_|_ _ _|    |_|_ _ _|_|_ _ _|
     |_|_|_ _ _|_|_|    |_ _|_|_ _ _|_|_|
                        |_|_ _ _|_|_ _ _|
        a(7) = 92           a(8) = 116
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,-3,1,-1,3,-3,1},{0,4,11,20,34,50,69},50]
    a[ n_] := (3*n^2 + 5*n)/2 - (-1)^Floor[n/4]*Boole[Mod[n, 4] == 3]; (* Michael Somos, Jan 25 2024 *)
  • PARI
    concat(0, Vec(x*(4 - x - x^2 + 3*x^3 + x^4)/((1 - x)^3*(1 + x^4)) + O(x^40))) \\ Felix Fröhlich, Jun 09 2021
    
  • PARI
    {a(n) = (3*n^2 + 5*n)/2 - (-1)^(n\4)*(n%4==3)}; /* Michael Somos, Jan 25 2024 */

Formula

O.g.f.: x*(4 - x - x^2 + 3*x^3 + x^4)/((1 - x)^3*(1 + x^4)).
E.g.f.: (exp(x)*x*(8 + 3*x) + (-1)^(1/4)*(sinh((-1)^(1/4)*x) - sin((-1)^(1/4)*x)))/2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) - a(n-4) + 3*a(n-5) - 3*a(n-6) + a(n-7) for n > 6.
a(n) = (n*(5 + 3*n) - (1 - (-1)^n)*sin((n-1)*Pi/4))/2.
a(n) = A211014(n/2) - A000035(n)*A056594((n-3)/2).
a(2*n) = A211014(n).
a(k) = A115067(k+1) for k not congruent to 3 mod 4 (A004773).
From Helmut Ruhland, Jan 29 2024: (Start)
For n > 1: a(n) - (2 * A368052(n+2) + A368052(n+3)) * 2 is periodic for n mod 8, i.e. a(n) = (2 * A368052(n+2) + A368052(n+3)) * 2 + f8(n) with
n mod 8 = 0 1 2 3 4 5 6 7
f8(n) = 0 0 -3 -2 -2 -2 1 0 (End)

A361804 Number of partitions of [n] with an equal number of even and odd block sizes.

Original entry on oeis.org

1, 0, 0, 3, 0, 15, 45, 63, 1260, 1515, 25515, 104973, 510345, 5679765, 17252235, 263214318, 1207222380, 11863296915, 101718989235, 630468648873, 8281982665215, 48583038314415, 656006633919945, 5122900223419938, 54304561161840825, 605082149235374265
Offset: 0

Views

Author

Alois P. Heinz, Jun 12 2023

Keywords

Comments

Half the number of block sizes are even and the other half are odd.

Examples

			a(0) = 1: () the empty partition.
a(1) = 0.
a(2) = 0.
a(3) = 3: 12|3, 13|2, 1|23.
a(4) = 0.
a(5) = 15: 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345, 1345|2, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234, 1|2345.
a(6) = 45: 12|34|5|6, 12|35|4|6, 12|3|45|6, 12|36|4|5, 12|3|46|5, 12|3|4|56, 13|24|5|6, 13|25|4|6, 13|2|45|6, 13|26|4|5, 13|2|46|5, 13|2|4|56, 14|23|5|6, 15|23|4|6, 1|23|45|6, 16|23|4|5, 1|23|46|5, 1|23|4|56, 14|25|3|6, 14|2|35|6, 14|26|3|5, 14|2|36|5, 14|2|3|56, 15|24|3|6, 1|24|35|6, 16|24|3|5, 1|24|36|5, 1|24|3|56, 15|2|34|6, 1|25|34|6, 16|2|34|5, 1|26|34|5, 1|2|34|56, 15|26|3|4, 15|2|36|4, 15|2|3|46, 16|25|3|4, 1|25|36|4, 1|25|3|46, 16|2|35|4, 1|26|35|4, 1|2|35|46, 16|2|3|45, 1|26|3|45, 1|2|36|45.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, x, y) option remember; `if`(abs(x-y)>2*n, 0,
         `if`(n=0, 1, b(n-1, x+1, y)+`if`(x>0, b(n-1, x-1, y+1)*x, 0)+
         `if`(y>0, b(n-1, x+1, y-1)*y, 0)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..33);

Formula

a(n) mod 5 = 3 for n in { A004767 }, a(n) mod 5 = 1 for n = 0 and a(n) mod 5 = 0 for all other n (n in { A004773 } \ { 0 }).
a(n) mod 3 = 0 for n >= 1.

A047400 Numbers that are congruent to {1, 3, 6} mod 8.

Original entry on oeis.org

1, 3, 6, 9, 11, 14, 17, 19, 22, 25, 27, 30, 33, 35, 38, 41, 43, 46, 49, 51, 54, 57, 59, 62, 65, 67, 70, 73, 75, 78, 81, 83, 86, 89, 91, 94, 97, 99, 102, 105, 107, 110, 113, 115, 118, 121, 123, 126, 129, 131, 134, 137, 139, 142, 145, 147, 150, 153, 155, 158
Offset: 1

Views

Author

Keywords

Comments

Union of A017077, A017101 and A017137. - R. J. Mathar, Apr 14 2008

Crossrefs

Programs

  • Magma
    [n: n in [1..300] | n mod 8 in [1, 3, 6]]; // Vincenzo Librandi, Mar 27 2011
  • Maple
    A047400:=n->2*(12*n-9+sqrt(3)*sin(2*n*Pi/3))/9: seq(A047400(n), n=1..100); # Wesley Ivan Hurt, Jun 10 2016
  • Mathematica
    Select[Range[0, 150], MemberQ[{1, 3, 6}, Mod[#, 8]] &] (* Wesley Ivan Hurt, Jun 10 2016 *)
  • PARI
    a(n) = {x=8*floor((n-1)/3);if(n%3==1,x=x+1);if(n%3==2,x=x+3);if(n%3==0,x=x+6);x} \\ Michael B. Porter, Oct 02 2009
    

Formula

a(n) = A004773(n-1) + A004773(n). - Gary W. Adamson, Sep 13 2007
G.f.: x*(1+x)*(2x^2+x+1)/((-1+x)^2*(x^2+x+1)). a(n) = a(n-3)+8 for n>3. - R. J. Mathar, Apr 14 2008
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = 2*(12*n-9+sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 8k-2, a(3k-1) = 8k-5, a(3k-2) = 8k-7. (End)

A222170 a(n) = n^2 + 2*floor(n^2/3).

Original entry on oeis.org

0, 1, 6, 15, 26, 41, 60, 81, 106, 135, 166, 201, 240, 281, 326, 375, 426, 481, 540, 601, 666, 735, 806, 881, 960, 1041, 1126, 1215, 1306, 1401, 1500, 1601, 1706, 1815, 1926, 2041, 2160, 2281, 2406, 2535, 2666, 2801, 2940, 3081, 3226, 3375, 3526, 3681, 3840
Offset: 0

Views

Author

Bruno Berselli, Aug 08 2013

Keywords

Comments

Also, a(n) = n^2 + floor(2*n^2/3), since 2*floor(n^2/3) = floor(2*n^2/3).

Crossrefs

Subsequence of A008851.
Cf. A004773 (numbers of the type n+floor(n/3)), A008810 (numbers of the type n^2-2*floor(n^2/3)), A047220 (numbers of the type n+floor(2*n/3)), A184637 (numbers of the type n^2+floor(n^2/3), except the first two).

Programs

  • Magma
    [n^2+2*Floor(n^2/3): n in [0..50]];
    
  • Magma
    I:=[0,1,6,15,26]; [n le 5 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-3)-2*Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Aug 18 2013
  • Mathematica
    Table[n^2 + 2 Floor[n^2/3], {n, 0, 50}]
    CoefficientList[Series[x (1 + x) (1 + 3 x + x^2) / ((1 + x + x^2) (1 - x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 18 2013 *)
    LinearRecurrence[{2, -1, 1, -2, 1}, {0, 1, 6, 15, 26}, 50] (* Hugo Pfoertner, Jan 17 2023 *)

Formula

G.f.: x*(1+x)*(1 + 3*x + x^2)/((1 + x + x^2)*(1-x)^3).
a(n) = a(-n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
a(n) = floor(5*n^2/3). - Wesley Ivan Hurt, Mar 16 2015
a(n) = a(n-3) + 5*(2n-3) [Tadeusz Dorozinski]. - Eduard Baumann, Jan 18 2023

A047421 Floor(8n/7).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75
Offset: 0

Views

Author

Keywords

Comments

Up to the offset identical to A004777, cf formula. - M. F. Hasler, Oct 06 2014

Crossrefs

Programs

  • Mathematica
    Table[Floor[8 n/7], {n, 0, 80}] (* Bruno Berselli, Oct 06 2014 *)
    LinearRecurrence[{1,0,0,0,0,0,1,-1},{0,1,2,3,4,5,6,8},70] (* Harvey P. Dale, Mar 06 2016 *)
  • PARI
    a(n)=n\7+n \\ M. F. Hasler, Oct 06 2014

Formula

a(n) = A004777(n+1). - M. F. Hasler, Oct 06 2014
G.f.: x*(1 + x + x^2 + x^3 + x^4 + x^5 + 2*x^6) / (1 - x - x^7 + x^8). [Bruno Berselli, Oct 06 2014]
a(n) = n + floor(n/7) = a(n-1) + a(n-7) - a(n-8). [Bruno Berselli, Oct 06 2014]

Extensions

More terms from Ray Chandler, Sep 05 2004
Restored to version of early 2008 by M. F. Hasler, Oct 06 2014
Previous Showing 21-30 of 30 results.