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.

Showing 1-10 of 17 results. Next

A180964 a(0)=1; for n>0, a(n) = 1 + 3*A117571(n-1).

Original entry on oeis.org

1, 4, 4, 10, 13, 13, 19, 22, 22, 28, 31, 31, 37, 40, 40, 46, 49, 49, 55, 58, 58, 64, 67, 67, 73, 76, 76, 82, 85, 85, 91, 94, 94, 100, 103, 103, 109, 112, 112, 118, 121, 121, 127, 130, 130, 136, 139, 139, 145, 148, 148, 154, 157, 157, 163, 166, 166, 172
Offset: 0

Views

Author

Bruno Berselli, Sep 28 2010 - Oct 01 2010

Keywords

Crossrefs

Cf. A061347.

Programs

  • Magma
    I:=[1, 4, 4, 10]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..60]]; // Vincenzo Librandi, Mar 26 2013
    
  • Maple
    m:=60; S:=series( (1+3*x+5*x^3)/((1-x)^2*(1+x+x^2)), x, m+1):
    seq(coeff(S, x, j), j=1..m); # G. C. Greubel, Apr 06 2021
  • Mathematica
    CoefficientList[Series[(1 +3x +5x^3)/((1-x)^2(1+x+x^2)), {x, 0, 60}], x] (* Vincenzo Librandi, Mar 26 2013 *)
    LinearRecurrence[{1,0,1,-1},{1,4,4,10},60] (* Harvey P. Dale, Aug 05 2020 *)
  • Sage
    [3*n +chebyshev_U(n, -1/2) +2*chebyshev_U(n-1, -1/2) for n in (0..60)] # G. C. Greubel, Apr 06 2021

Formula

G.f.: (1 +3*x +5*x^3)/((1-x)^2*(1+x+x^2)).
a(n) = a(n-1) +a(n-3) -a(n-4) for n>3.
a(n) = (n-1)*(n mod 3) +(n+1)*(n+1 mod 3) +n*(n+2 mod 3).
a(n) = 3*n +sqrt(3)*cos((4*n-3)*Pi/6) -sin((4*n-3)*Pi/6).
a(n) - a(n-1) = 3*A080425(n+1) for n>0.
From G. C. Greubel, Apr 06 2021: (Start)
a(n) = 3*n - 2*cos(2*Pi*(n+1)/3) = 3*n + A061347(n+1).
a(n) = 3*n + ChebyshevU(n, -1/2) + 2*ChebyshevU(n-1, -1/2). (End)

A183558 Number of partitions of n containing a clique of size 1.

Original entry on oeis.org

0, 1, 1, 2, 3, 6, 7, 13, 16, 25, 33, 49, 61, 90, 113, 156, 198, 269, 334, 448, 556, 726, 902, 1163, 1428, 1827, 2237, 2817, 3443, 4302, 5219, 6478, 7833, 9632, 11616, 14197, 17031, 20712, 24769, 29925, 35688, 42920, 50980, 61059, 72318, 86206, 101837, 120941
Offset: 0

Views

Author

Alois P. Heinz, Jan 05 2011

Keywords

Comments

All parts of a number partition with the same value form a clique. The size of a clique is the number of elements in the clique.

Examples

			a(5) = 6, because 6 partitions of 5 contain (at least) one clique of size 1: [1,1,1,2], [1,2,2], [1,1,3], [2,3], [1,4], [5].
From _Gus Wiseman_, Apr 19 2019: (Start)
The a(1) = 1 through a(8) = 16 partitions are the following. The Heinz numbers of these partitions are given by A052485 (weak numbers).
  (1)  (2)  (3)   (4)    (5)     (6)      (7)       (8)
            (21)  (31)   (32)    (42)     (43)      (53)
                  (211)  (41)    (51)     (52)      (62)
                         (221)   (321)    (61)      (71)
                         (311)   (411)    (322)     (332)
                         (2111)  (3111)   (331)     (422)
                                 (21111)  (421)     (431)
                                          (511)     (521)
                                          (2221)    (611)
                                          (3211)    (3221)
                                          (4111)    (4211)
                                          (31111)   (5111)
                                          (211111)  (32111)
                                                    (41111)
                                                    (311111)
                                                    (2111111)
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, [0, 0],
          add((l->`if`(j=1, [l[1]$2], l))(b(n-i*j, i-1)), j=0..n/i)))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..50);
  • Mathematica
    max = 50; f = (1 - Product[1 - x^j + x^(2*j), {j, 1, max}])/Product[1 - x^j, {j, 1, max}]; s = Series[f, {x, 0, max}]; CoefficientList[s, x] (* Jean-François Alcover, Oct 01 2014. Edited by Gus Wiseman, Apr 19 2019 *)

Formula

G.f.: (1-Product_{j>0} (1-x^(j)+x^(2*j))) / (Product_{j>0} (1-x^j)).
From Vaclav Kotesovec, Nov 15 2016: (Start)
a(n) = A000041(n) - A007690(n).
a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*n). (End)

Extensions

a(0)=0 prepended by Gus Wiseman, Apr 19 2019

A090858 Number of partitions of n such that there is exactly one part which occurs twice, while all other parts occur only once.

Original entry on oeis.org

0, 0, 1, 0, 2, 2, 2, 4, 6, 7, 8, 13, 15, 21, 25, 30, 39, 50, 58, 74, 89, 105, 129, 156, 185, 221, 264, 309, 366, 433, 505, 593, 696, 805, 941, 1090, 1258, 1458, 1684, 1933, 2225, 2555, 2922, 3346, 3823, 4349, 4961, 5644, 6402, 7267, 8234, 9309, 10525, 11886, 13393
Offset: 0

Views

Author

Vladeta Jovovic, Feb 12 2004

Keywords

Comments

Number of solutions (p(1),p(2),...,p(n)), p(i)>=0,i=1..n, to p(1)+2*p(2)+...+n*p(n)=n such that |{i: p(i)<>0}| = p(1)+p(2)+...+p(n)-1.
Also number of partitions of n such that if k is the largest part, then, with exactly one exception, all the integers 1,2,...,k occur as parts. Example: a(7)=4 because we have [4,2,1], [3,3,1], [3,2,2] and [3,1,1,1,1]. - Emeric Deutsch, Apr 18 2006

Examples

			a(7) = 4 because we have 4 such partitions of 7: [1,1,2,3], [1,1,5], [2,2,3], [1,3,3].
From _Gus Wiseman_, Apr 19 2019: (Start)
The a(2) = 1 through a(11) = 13 partitions described in the name are the following (empty columns not shown). The Heinz numbers of these partitions are given by A060687.
  (11)  (22)   (221)  (33)   (322)   (44)    (441)   (55)    (443)
        (211)  (311)  (411)  (331)   (332)   (522)   (433)   (533)
                             (511)   (422)   (711)   (442)   (551)
                             (3211)  (611)   (3321)  (622)   (722)
                                     (3221)  (4221)  (811)   (911)
                                     (4211)  (4311)  (5221)  (4322)
                                             (5211)  (5311)  (4331)
                                                     (6211)  (4421)
                                                             (5411)
                                                             (6221)
                                                             (6311)
                                                             (7211)
                                                             (43211)
The a(2) = 1 through a(10) = 8 partitions described in Emeric Deutsch's comment are the following (empty columns not shown). The Heinz numbers of these partitions are given by A325284.
  (2)  (22)  (32)   (222)   (322)    (332)     (432)      (3322)
       (31)  (311)  (3111)  (331)    (431)     (3222)     (3331)
                            (421)    (2222)    (4221)     (22222)
                            (31111)  (3311)    (4311)     (42211)
                                     (4211)    (33111)    (43111)
                                     (311111)  (42111)    (331111)
                                               (3111111)  (421111)
                                                          (31111111)
(End)
		

Crossrefs

Programs

  • Maple
    g:=sum(x^(k*(k+1)/2)*((1-x^k)/x^(k-1)/(1-x)-k)/product(1-x^i,i=1..k),k=1..15): gser:=series(g,x=0,64): seq(coeff(gser,x,n),n=1..54); # Emeric Deutsch, Apr 18 2006
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(n>i*(i+3-2*t)/2, 0,
         `if`(n=0, t, b(n, i-1, t)+`if`(i>n, 0, b(n-i, i-1, t)+
         `if`(t=1 or 2*i>n, 0, b(n-2*i, i-1, 1)))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 28 2015
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n > i*(i + 3 - 2*t)/2, 0, If[n == 0, t, b[n, i - 1, t] + If[i > n, 0,  b[n - i, i - 1, t] + If[t == 1 || 2*i > n, 0, b[n - 2*i, i - 1, 1]]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 100} ] (* Jean-François Alcover, Jan 20 2016, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],Length[#]-Length[Union[#]]==1&]],{n,0,30}] (* Gus Wiseman, Apr 19 2019 *)
  • PARI
    alist(n)=concat([0,0],Vec(sum(k=1,n\2,(x^(2*k)+x*O(x^n))/(1+x^k)*prod(j=1,n-2*k,1+x^j+x*O(x^n))))) \\ Franklin T. Adams-Watters, Nov 02 2015

Formula

G.f.: Sum_{k>0} x^(2*k)/(1+x^k) * Product_{k>0} (1+x^k). Convolution of 1-A048272(n) and A000009(n). a(n) = A036469(n) - A015723(n).
G.f.: sum(x^(k(k+1)/2)[(1-x^k)/x^(k-1)/(1-x)-k]/product(1-x^i,i=1..k), k=1..infinity). - Emeric Deutsch, Apr 18 2006
a(n) ~ c * exp(Pi*sqrt(n/3)) / n^(1/4), where c = 3^(1/4) * (1 - log(2)) / (2*Pi) = 0.064273294789... - Vaclav Kotesovec, May 24 2018

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 26 2004
a(0) added by Franklin T. Adams-Watters, Nov 02 2015

A325244 Number of integer partitions of n with one fewer distinct multiplicities than distinct parts.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 4, 7, 12, 16, 21, 33, 38, 50, 75, 87, 111, 150, 185, 244, 307, 373, 461, 585, 702, 856, 1043, 1255, 1498, 1822, 2143, 2565, 3064, 3607, 4251, 5064, 5920, 6953, 8174, 9503, 11064, 12927, 14921, 17320, 19986, 23067, 26485, 30499, 34894
Offset: 0

Views

Author

Gus Wiseman, Apr 15 2019

Keywords

Comments

For example, (32211) has two distinct multiplicities (1, 2) and three distinct parts (1, 2, 3) so is counted under a(9).
The Heinz numbers of these partitions are given by A325259.

Examples

			The a(3) = 1 through a(10) = 16 partitions:
  (21)  (31)  (32)  (42)    (43)    (53)     (54)      (64)
              (41)  (51)    (52)    (62)     (63)      (73)
                    (2211)  (61)    (71)     (72)      (82)
                            (3211)  (3221)   (81)      (91)
                                    (3311)   (3321)    (3322)
                                    (4211)   (4221)    (4411)
                                    (32111)  (4311)    (5221)
                                             (5211)    (5311)
                                             (32211)   (6211)
                                             (42111)   (32221)
                                             (222111)  (33211)
                                             (321111)  (42211)
                                                       (43111)
                                                       (52111)
                                                       (421111)
                                                       (3211111)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[Union[#]]==Length[Union[Length/@Split[#]]]+1&]],{n,0,30}]

A127002 Number of partitions of n that have the form a+a+b+c where a,b,c are distinct.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 4, 3, 7, 8, 11, 11, 17, 17, 23, 23, 30, 31, 39, 38, 48, 49, 58, 58, 70, 70, 82, 82, 95, 96, 110, 109, 125, 126, 141, 141, 159, 159, 177, 177, 196, 197, 217, 216, 238, 239, 260, 260, 284, 284, 308, 308, 333, 334, 360, 359, 387, 388, 415, 415, 445
Offset: 1

Views

Author

Clark Kimberling, Jan 01 2007

Keywords

Comments

From Gus Wiseman, Apr 19 2019: (Start)
Also the number of integer partitions of n - 4 of the form a+b, a+a+b, or a+a+b+c, ignoring ordering. A bijection can be constructed from the partitions described in the name by subtracting one from all parts and deleting zeros. These are also partitions with adjusted frequency depth (A323014, A325280) equal to their length plus one, and their Heinz numbers are given by A325281. For example, the a(7) = 1 through a(13) = 11 partitions are:
(21) (31) (32) (42) (43) (53) (54)
(211) (41) (51) (52) (62) (63)
(221) (411) (61) (71) (72)
(311) (322) (332) (81)
(331) (422) (441)
(511) (611) (522)
(3211) (3221) (711)
(4211) (3321)
(4221)
(4311)
(5211)
(End)

Examples

			a(10) counts these partitions: {1,1,2,6}, (1,1,3,5), {2,2,1,5}.
a(11) counts {1,1,2,7}, {1,1,3,6}, {1,1,4,5}, {2,2,1,6}, {2,2,3,4}, {3,3,1,4}, {4,4,1,2}
From _Gus Wiseman_, Apr 19 2019: (Start)
The a(7) = 1 through a(13) = 11 partitions of the form a+a+b+c are the following. The Heinz numbers of these partitions are given by A085987.
  (3211)  (3221)  (3321)  (5221)  (4322)  (4332)  (4432)
          (4211)  (4221)  (5311)  (4331)  (4431)  (5332)
                  (4311)  (6211)  (4421)  (5322)  (5422)
                  (5211)          (5411)  (5331)  (5521)
                                  (6221)  (6411)  (6322)
                                  (6311)  (7221)  (6331)
                                  (7211)  (7311)  (6511)
                                          (8211)  (7411)
                                                  (8221)
                                                  (8311)
                                                  (9211)
(End)
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 70); [0,0,0,0,0,0] cat Coefficients(R!( x^7*(1+2*x+3*x^2)/((1-x^2)*(1-x^3)*(1-x^4)) )); // G. C. Greubel, May 30 2019
    
  • Maple
    g:=sum(sum(sum(x^(i+j+k)*(x^i+x^j+x^k),i=1..j-1),j=2..k-1),k=3..80): gser:=series(g,x=0,70): seq(coeff(gser,x,n),n=1..65); # Emeric Deutsch, Jan 05 2007
    isA127002 := proc(p) local s; if nops(p) = 4 then s := convert(p,set) ; if nops(s) = 3 then RETURN(1) ; else RETURN(0) ; fi ; else RETURN(0) ; fi ; end:
    A127002 := proc(n) local part,res,p; part := combinat[partition](n) ; res := 0 ; for p from 1 to nops(part) do res := res+isA127002(op(p,part)) ; od ; RETURN(res) ; end:
    for n from 1 to 200 do print(A127002(n)) ; od ; # R. J. Mathar, Jan 07 2007
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Sort[Length/@Split[#]]=={1,1,2}&]],{n,70}] (* Gus Wiseman, Apr 19 2019 *)
    Rest[CoefficientList[Series[x^7*(1+2*x+3*x^2)/((1-x^2)*(1-x^3)*(1-x^4)), {x,0,70}], x]] (* G. C. Greubel, May 30 2019 *)
  • PARI
    my(x='x+O('x^70)); concat(vector(6), Vec(x^7*(1+2*x+3*x^2)/((1-x^2)*(1-x^3)*(1-x^4)))) \\ G. C. Greubel, May 30 2019
    
  • Sage
    a=(x^7*(1+2*x+3*x^2)/((1-x^2)*(1-x^3)*(1-x^4))).series(x, 70).coefficients(x, sparse=False); a[1:] # G. C. Greubel, May 30 2019

Formula

G.f.: x^7*(1+2*x+3*x^2)/((1-x^2)*(1-x^3)*(1-x^4)) - Vladeta Jovovic, Jan 03 2007
G.f.: Sum_{k>=3} Sum_{j=2..k-1} Sum_{m=1..j-1} x^(m+j+k)*(x^m +x^j +x^k). - Emeric Deutsch, Jan 05 2007
a(n) = binomial(floor((n-1)/2),2) - floor((n-1)/3) - floor((n-1)/4) + floor(n/4). - Mircea Merca, Nov 23 2013
a(n) = A005044(n-4) + 2*A005044(n-3) + 3*A005044(n-2). - R. J. Mathar, Nov 23 2013

A325270 Numbers with 1 fewer distinct prime exponents than (not necessarily distinct) prime factors.

Original entry on oeis.org

4, 6, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 28, 33, 34, 35, 38, 39, 44, 45, 46, 49, 50, 51, 52, 55, 57, 58, 62, 63, 65, 68, 69, 74, 75, 76, 77, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 106, 111, 115, 116, 117, 118, 119, 121, 122, 123, 124, 129, 133
Offset: 1

Views

Author

Gus Wiseman, Apr 18 2019

Keywords

Comments

Also Heinz numbers of integer partitions with 1 fewer distinct multiplicities than parts, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). The enumeration of these partitions by sum is given by A117571.
Also numbers whose sorted prime signature is (1,1), (2), or (1,2). - Gus Wiseman, Jul 03 2019

Examples

			The sequence of terms together with their prime indices begins:
    4: {1,1}
    6: {1,2}
    9: {2,2}
   10: {1,3}
   12: {1,1,2}
   14: {1,4}
   15: {2,3}
   18: {1,2,2}
   20: {1,1,3}
   21: {2,4}
   22: {1,5}
   25: {3,3}
   26: {1,6}
   28: {1,1,4}
   33: {2,5}
   34: {1,7}
   35: {3,4}
   38: {1,8}
   39: {2,6}
   44: {1,1,5}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],PrimeOmega[#]==Length[Union[Last/@FactorInteger[#]]]+1&]

A221028 T(n,k) = Sum of neighbor maps: log base 2 of the number of n X k binary arrays indicating the locations of corresponding elements equal to the sum mod 2 of their horizontal, vertical and antidiagonal neighbors in a random 0..1 n X k array.

Original entry on oeis.org

1, 1, 1, 3, 3, 3, 4, 6, 6, 4, 4, 6, 7, 6, 4, 6, 10, 11, 11, 10, 6, 7, 11, 14, 16, 14, 11, 7, 7, 13, 17, 20, 20, 17, 13, 7, 9, 16, 19, 21, 24, 21, 19, 16, 9, 10, 16, 24, 27, 30, 30, 27, 24, 16, 10, 10, 20, 27, 31, 35, 33, 35, 31, 27, 20, 10, 12, 21, 30, 33, 40, 42, 42, 40, 33, 30, 21, 12, 13
Offset: 1

Views

Author

R. H. Hardin, Dec 29 2012

Keywords

Comments

Table starts
..1..1..3..4..4..6..7..7..9.10.10.12.13.13.15.16.16.18
..1..3..6..6.10.11.13.16.16.20.21.23.26.26.30.31.33
..3..6..7.11.14.17.19.24.27.30.30.36.39.42.43.47
..4..6.11.16.20.21.27.31.33.40.44.47.50.56.60
..4.10.14.20.24.30.35.40.42.48.55.59.62.69
..6.11.17.21.30.33.42.46.54.60.66.71.75
..7.13.19.27.35.42.45.53.62.69.72.83
..7.16.24.31.40.46.53.63.69.79.87
..9.16.27.33.42.54.62.69.81
.10.20.30.40.48.60.69.79
.10.21.30.44.55.66.72
.12.23.36.47.59.71

Examples

			Some solutions for n=3 k=4
..1..1..0..0....1..1..0..0....1..0..1..0....0..1..1..0....0..0..1..0
..0..0..1..1....1..0..1..0....1..1..1..1....1..1..0..1....0..0..0..1
..1..0..1..0....0..1..0..0....1..1..1..0....0..1..0..1....1..1..0..0
		

Crossrefs

Column 1 is A117571.

Formula

Empirical for column k:
k=1: a(n) = a(n-1) +a(n-3) -a(n-4) increment period 3: 0 2 1
k=2: a(n) = a(n-1) +a(n-5) -a(n-6) increment period 5: 2 3 0 4 1
k=3: a(n) = a(n-1) +a(n-12) -a(n-13) increment period 12: 3 1 4 3 3 2 5 3 3 0 6 3
k=4: a(n) = a(n-1) +a(n-17) -a(n-18) increment period 17: 2 5 5 4 1 6 4 2 7 4 3 3 6 4 0 8 4
k=5: a(n) = a(n-1) +a(n-30) -a(n-31) increment period 30: 6 4 6 4 6 5 5 2 6 7 4 3 7 3 7 6 3 4 8 5 5 4 6 4 6 4 6 0 10 4

A273724 Place n equally-spaced points around a circle, labeled 0,1,2,...,n-1. For each i = 0..n-1 such that 3i != i mod n, draw an (undirected) chord from i to (3i mod n). Then a(n) is the total number of distinct chords.

Original entry on oeis.org

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

Views

Author

Kival Ngaokrajang, May 28 2016

Keywords

Crossrefs

Cf. A117571 (if 3i is changed to 2i), A274462 (if 3i is changed to 4i).

Formula

a(n) = n-1 if n>0 is odd, n-2 if n == +-2 (mod 8), n-3 if n == 4 (mod 8), and n-5 if n == 0 (mod 8). These formulas are easily established by observing that the chord at i is missing if 2i == 0 mod n, and the chords starting at i and at 3i coincide if 8i == 0 mod n. The formulas then imply that the g.f. is 4+x^2/(1-x)^2-(4+x^2+2*x^4+x^6)/(1-x^8), which can be rewritten as (5*x^63*x^5+2*x^4+3*x^2-x+2)*x^3/((1-x)*(1-x^8)). (This g.f. was conjectured by Colin Barker.) - Brooke Logan and N. J. A. Sloane, Jun 23 2016
a(n) = a(n-1)+a(n-8)-a(n-9) for n>9. - Colin Barker, May 29 2016 (This follows from the above g.f. - Brooke Logan and N. J. A. Sloane)

Extensions

Definition edited by N. J. A. Sloane, Jun 23 2016

A274462 Place n equally-spaced points around a circle, labeled 0,1,2,...,n-1. For each i = 0..n-1 such that 4i != i mod n, draw an (undirected) chord from i to (4i mod n). Then a(n) is the total number of distinct chords.

Original entry on oeis.org

0, 0, 1, 0, 3, 2, 3, 6, 7, 6, 7, 10, 9, 12, 13, 6, 15, 16, 15, 18, 17, 18, 21, 22, 21, 22, 25, 24, 27, 28, 21, 30, 31, 30, 33, 32, 33, 36, 37, 36, 37, 40, 39, 42, 43, 36, 45, 46, 45, 48, 47, 48, 51, 52, 51, 52, 55, 54, 57, 58, 51
Offset: 0

Views

Author

Brooke Logan, Jun 24 2016

Keywords

Crossrefs

If 4i in the definition is replaced by 2i we get A117571, and if 4i is replaced by 3i we get A273724.

Programs

  • Maple
    M:=4; # M is the multiplier (2 for A117571, 3 for A273724, 4 for the present sequence)
    ans:=[0,0];
    for n from 2 to 100 do
    h:=Array(0..n-1,0..n-1,0); ct:=0;
    for i from 1 to n-1 do j := (M*i mod n);
    if ij then if h[j,i]=0 then ct:=ct+1; h[j,i]:=1; fi;
    fi;
    od:
    ans:=[op(ans),ct];
    od:
    ans;  # N. J. A. Sloane, Jun 24 2016

Formula

We argue as in A273724. There are n-1 choices for i.
For nontrivial chords we need i != 4i mod n, which means 3i != 0 mod n, and so when n == 0 mod 3 we must subtract 2 from n-1.
A chord occurs twice (but must be counted only once) when j==4i mod n and i==4j mod n, thus when 15i==0 mod n. If n==+/- 5 mod 15 then subtract another 2, if n==0 mod 15 subtract 6.
Putting the pieces together, we obtain the g.f.
8 + x^2/(1-x)^2 - 2/(1-x^3) - 2(x^5+x^10)/(1-x^15) - 6/(1-x^15),
which can be rewritten as
x^2*(9*x^14-7*x^13+x^12+3*x^11-x^10+3*x^9+x^8-x^7+x^6+3*x^5+x^4-x^3+3*x^2-x+1)/((1-x)*(1-x^15)).

A116948 Riordan array ((1+2x^2)/(1-x^3),x).

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 1, 2, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 1, 2, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1
Offset: 0

Views

Author

Paul Barry, Mar 29 2006

Keywords

Comments

Row sums are A117571. Diagonal sums are A117572. Inverse is A116949.

Examples

			Triangle begins
1,
0, 1,
2, 0, 1,
1, 2, 0, 1,
0, 1, 2, 0, 1,
2, 0, 1, 2, 0, 1,
1, 2, 0, 1, 2, 0, 1,
0, 1, 2, 0, 1, 2, 0, 1,
2, 0, 1, 2, 0, 1, 2, 0, 1
		

Formula

Number triangle T(n,k)=2*J(L((n-k+2)/3))[k<=n] where L(j/p) is the Legendre symbol of j and p and J(n)=A001045(n)
Showing 1-10 of 17 results. Next