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 11 results. Next

A183855 n+floor(sqrt(3n-3)); complement of A128422.

Original entry on oeis.org

1, 3, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Clark Kimberling, Jan 07 2011

Keywords

Crossrefs

Cf. A128422.

A007997 a(n) = ceiling((n-3)(n-4)/6).

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 5, 7, 10, 12, 15, 19, 22, 26, 31, 35, 40, 46, 51, 57, 64, 70, 77, 85, 92, 100, 109, 117, 126, 136, 145, 155, 166, 176, 187, 199, 210, 222, 235, 247, 260, 274, 287, 301, 316, 330, 345, 361, 376, 392, 409, 425, 442, 460, 477, 495, 514, 532, 551, 571, 590, 610
Offset: 3

Views

Author

Keywords

Comments

Number of solutions to x+y+z=0 (mod m) with 0<=x<=y<=z
Nonorientable genus of complete graph on n nodes.
Also (with different offset) Molien series for alternating group A_3.
(1+x^3 ) / ((1-x)*(1-x^2)*(1-x^3)) is the Poincaré series [or Poincare series] (or Molien series) for H^*(S_6, F_2).
a(n+5) is the number of necklaces with 3 black beads and n white beads.
The g.f./x^5 is Z(C_3,x), the 3-variate cycle index polynomial for the cyclic group C_3, with substitution x[i]->1/(1-x^i), i=1,2,3. Therefore by Polya enumeration a(n+5) is the number of cyclically inequivalent 3-necklaces whose 3 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... . See A102190 for Z(C_3,x). - Wolfdieter Lang, Feb 15 2005
a(n+1) is the number of pairs (x,y) with x and y in {0,...,n}, x = (y mod 3), and x+y < n. - Clark Kimberling, Jul 02 2012
From Gus Wiseman, Oct 17 2020: (Start)
Also the number of 3-part integer compositions of n - 2 that are either weakly increasing or strictly decreasing. For example, the a(5) = 1 through a(13) = 15 compositions are:
(111) (112) (113) (114) (115) (116) (117) (118) (119)
(122) (123) (124) (125) (126) (127) (128)
(222) (133) (134) (135) (136) (137)
(321) (223) (224) (144) (145) (146)
(421) (233) (225) (226) (155)
(431) (234) (235) (227)
(521) (333) (244) (236)
(432) (334) (245)
(531) (532) (335)
(621) (541) (344)
(631) (542)
(721) (632)
(641)
(731)
(821)
(End)

Examples

			For m=7 (n=12), the 12 solutions are xyz = 000 610 520 511 430 421 331 322 662 653 644 554.
		

References

  • A. Adem and R. J. Milgram, Cohomology of Finite Groups, Springer-Verlag, 2nd. ed., 2004, p. 204.
  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 105.
  • J. L. Gross and T. W. Tucker, Topological Graph Theory, Wiley, 1987; see \bar{I}(n) p. 221.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 740.
  • E. V. McLaughlin, Numbers of factorizations in non-unique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, 2004.

Crossrefs

Apart from initial term, same as A058212.
A001399(n-6)*2 = A069905(n-3)*2 = A211540(n-1)*2 counts the strict case.
A014311 intersected with A225620 U A333256 ranks these compositions.
A218004 counts these compositions of any length.
A000009 counts strictly decreasing compositions.
A000041 counts weakly increasing compositions.
A001523 counts unimodal compositions, with complement counted by A115981.
A007318 and A097805 count compositions by length.
A032020 counts strict compositions, ranked by A233564.
A333149 counts neither increasing nor decreasing strict compositions.

Programs

  • Haskell
    a007997 n = ceiling $ (fromIntegral $ (n - 3) * (n - 4)) / 6
    a007997_list = 0 : 0 : 1 : zipWith (+) a007997_list [1..]
    -- Reinhard Zumkeller, Dec 18 2013
    
  • Maple
    x^5*(1+x^3)/((1-x)*(1-x^2)*(1-x^3));
    seq(ceil(binomial(n,2)/3), n=0..63); # Zerinvary Lajos, Jan 12 2009
    a := n -> (n*(n-7)-2*([1,1,-1][n mod 3 +1]-7))/6;
    seq(a(n), n=3..64); # Peter Luschny, Jan 13 2015
  • Mathematica
    k = 3; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    Table[Ceiling[((n-3)(n-4))/6],{n,3,100}] (* or *) LinearRecurrence[ {2,-1,1,-2,1},{0,0,1,1,2},100] (* Harvey P. Dale, Jan 21 2014 *)
  • PARI
    a(n)=(n^2-7*n+16)\6 \\ Charles R Greathouse IV, Sep 24 2015

Formula

a(n) = a(n-3) + n - 2, a(0)=0, a(1)=0, a(2)=1 [Offset 0]. - Paul Barry, Jul 14 2004
G.f.: x^5*(1+x^3)/((1-x)*(1-x^2)*(1-x^3)) = x^5*(1-x+x^2)/((1-x)^2*(1-x^3)).
a(n+5) = Sum_{k=0..floor(n/2)} C(n-k,L(k/3)), where L(j/p) is the Legendre symbol of j and p. - Paul Barry, Mar 16 2006
a(3)=0, a(4)=0, a(5)=1, a(6)=1, a(7)=2, a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5). - Harvey P. Dale, Jan 21 2014
a(n) = (n^2 - 7*n + 14 - 2*(-1)^(2^(n + 1 - 3*floor((n+1)/3))))/6. - Luce ETIENNE, Dec 27 2014
a(n) = A001399(n-3) + A001399(n-6). Compare to A140106(n) = A001399(n-3) - A001399(n-6). - Gus Wiseman, Oct 17 2020
a(n) = (40 + 3*(n - 7)*n - 4*cos(2*n*Pi/3) - 4*sqrt(3)*sin(2*n*Pi/3))/18. - Stefano Spezia, Dec 14 2021
Sum_{n>=5} 1/a(n) = 6 - 2*Pi/sqrt(3) + 2*Pi*tanh(sqrt(5/3)*Pi/2)/sqrt(15). - Amiram Eldar, Oct 01 2022

A337484 Number of ordered triples of positive integers summing to n that are neither strictly increasing nor strictly decreasing.

Original entry on oeis.org

0, 0, 0, 1, 3, 6, 8, 13, 17, 22, 28, 35, 41, 50, 58, 67, 77, 88, 98, 111, 123, 136, 150, 165, 179, 196, 212, 229, 247, 266, 284, 305, 325, 346, 368, 391, 413, 438, 462, 487, 513, 540, 566, 595, 623, 652, 682, 713, 743, 776, 808, 841, 875, 910, 944, 981, 1017
Offset: 0

Author

Gus Wiseman, Sep 11 2020

Keywords

Examples

			The a(3) = 1 through a(7) = 13 triples:
  (1,1,1)  (1,1,2)  (1,1,3)  (1,1,4)  (1,1,5)
           (1,2,1)  (1,2,2)  (1,3,2)  (1,3,3)
           (2,1,1)  (1,3,1)  (1,4,1)  (1,4,2)
                    (2,1,2)  (2,1,3)  (1,5,1)
                    (2,2,1)  (2,2,2)  (2,1,4)
                    (3,1,1)  (2,3,1)  (2,2,3)
                             (3,1,2)  (2,3,2)
                             (4,1,1)  (2,4,1)
                                      (3,1,3)
                                      (3,2,2)
                                      (3,3,1)
                                      (4,1,2)
                                      (5,1,1)
		

Crossrefs

A140106 is the unordered case.
A242771 allows strictly increasing but not strictly decreasing triples.
A337481 counts these compositions of any length.
A001399(n - 6) counts unordered strict triples.
A001523 counts unimodal compositions, with complement A115981.
A007318 and A097805 count compositions by length.
A069905 counts unordered triples.
A218004 counts strictly increasing or weakly decreasing compositions.
A332745 counts partitions with weakly increasing or weakly decreasing run-lengths.
A332835 counts compositions with weakly increasing or weakly decreasing run-lengths.
A337483 counts triples either weakly increasing or weakly decreasing.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],!Less@@#&&!Greater@@#&]],{n,0,15}]

Formula

a(n) = 2*A242771(n - 1) - A000217(n - 1), n > 0.
2*A001399(n - 6) = 2*A069905(n - 3) = 2*A211540(n - 1) is the complement.
4*A001399(n - 6) = 4*A069905(n - 3) = 4*A211540(n - 1) is the strict case.
Conjectures from Colin Barker, Sep 13 2020: (Start)
G.f.: x^3*(1 + 2*x + 2*x^2 - x^3) / ((1 - x)^3*(1 + x)*(1 + x + x^2)).
a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6) for n>6.
(End)

A337482 Number of compositions of n that are neither strictly increasing nor weakly decreasing.

Original entry on oeis.org

0, 0, 0, 0, 2, 7, 18, 45, 101, 219, 461, 957, 1957, 3978, 8036, 16182, 32506, 65202, 130642, 261601, 523598, 1047709, 2096062, 4192946, 8386912, 16775117, 33551832, 67105663, 134213789, 268430636, 536865013, 1073734643, 2147474910, 4294956706, 8589921771
Offset: 0

Author

Gus Wiseman, Sep 11 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.

Examples

			The a(4) = 2 through a(4) = 18 compositions:
  (112)  (113)   (114)
  (121)  (122)   (132)
         (131)   (141)
         (212)   (213)
         (1112)  (231)
         (1121)  (312)
         (1211)  (1113)
                 (1122)
                 (1131)
                 (1212)
                 (1221)
                 (1311)
                 (2112)
                 (2121)
                 (11112)
                 (11121)
                 (11211)
                 (12111)
		

Crossrefs

Ranked by the complement of the intersection of A114994 and A333255.
A128422 counts only the case of length 3.
A218004 counts the complement.
A332834 is the weak version.
A337481 is the strict version.
A001523 counts unimodal compositions, with complement counted by A115981.
A007318 and A097805 count compositions by length.
A032020 counts strict compositions, ranked by A233564.
A332745/A332835 count partitions/compositions with weakly increasing or weakly decreasing run-lengths.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!Less@@#&&!GreaterEqual@@#&]],{n,0,15}]

Formula

a(n) = 2^(n-1) - A000009(n) - A000041(n) + 1, n > 0.

A143974 Rectangular array R by antidiagonals: label each unit square in the first quadrant lattice by its northeast vertex (x,y) and mark those having x+y=1(mod 3); then R(m,n) is the number of marked unit squares in the rectangle [0,m]x[0,n].

Original entry on oeis.org

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

Author

Clark Kimberling, Sep 06 2008

Keywords

Comments

Examples

			Northwest corner:
0 0 1 1 1 2
0 1 2 2 3 4
1 2 3 4 5 6
1 2 4 5 6 8
1 3 5 6 8 10
R(3,4) counts these marked squares: (1,3), (2,2), (3,1), (3,4).
		

Crossrefs

Formula

R(m,n)=floor(mn/3).

A143977 Rectangular array R by antidiagonals: label each unit square in the first quadrant lattice by its northeast vertex (x,y) and mark squares having |x-y| == 0 (mod 3); then R(m,n) is the number of marked squares in the rectangle [0,m] X [0,n].

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 4, 4, 4, 4, 2, 3, 4, 5, 6, 5, 4, 3, 3, 5, 6, 7, 7, 6, 5, 3, 3, 6, 7, 8, 9, 8, 7, 6, 3, 4, 6, 8, 10, 10, 10, 10, 8, 6, 4, 4, 7, 9, 11, 12, 12, 12, 11, 9, 7, 4, 4, 8, 10, 12, 14, 14, 14, 14, 12, 10, 8, 4, 5, 8, 11, 14, 15, 16, 17, 16, 15, 14, 11, 8, 5
Offset: 1

Author

Clark Kimberling, Sep 06 2008

Keywords

Comments

Rows numbered 3,6,9,12,15,... are, except for initial terms, multiples of (1,2,3,4,5,6,7,...) = A000027.

Examples

			Northwest corner:
  1  1  1  2  2  2  3
  1  2  2  3  4  4  5
  1  2  3  4  5  6  7
  2  3  4  6  7  8 10
  2  4  5  7  9 10 12
		

Crossrefs

Rows and columns: A002264, A004523, A000027, A004772, A047212, et al.

Programs

  • Mathematica
    T[m_,n_]:=Ceiling[m n/3];Flatten[Table[T[m-n+1,n],{m,13},{n,m}]] (* Stefano Spezia, Oct 27 2022 *)

Formula

R(m,n) = ceiling(m*n/3). [Corrected by Stefano Spezia, Oct 27 2022]

A321773 Number of compositions of n into parts with distinct multiplicities and with exactly three parts.

Original entry on oeis.org

1, 3, 6, 4, 9, 9, 10, 12, 15, 13, 18, 18, 19, 21, 24, 22, 27, 27, 28, 30, 33, 31, 36, 36, 37, 39, 42, 40, 45, 45, 46, 48, 51, 49, 54, 54, 55, 57, 60, 58, 63, 63, 64, 66, 69, 67, 72, 72, 73, 75, 78, 76, 81, 81, 82, 84, 87, 85, 90, 90, 91, 93, 96, 94, 99, 99
Offset: 3

Author

Alois P. Heinz, Nov 18 2018

Keywords

Examples

			From _Gus Wiseman_, Nov 11 2020: (Start)
Also the number of 3-part non-strict compositions of n. For example, the a(3) = 1 through a(11) = 15 triples are:
  111   112   113   114   115   116   117   118   119
        121   122   141   133   161   144   181   155
        211   131   222   151   224   171   226   191
              212   411   223   233   225   244   227
              221         232   242   252   262   272
              311         313   323   333   334   335
                          322   332   414   343   344
                          331   422   441   424   353
                          511   611   522   433   434
                                      711   442   443
                                            622   515
                                            811   533
                                                  551
                                                  722
                                                  911
(End)
		

Crossrefs

Column k=3 of A242887.
A235451 counts 3-part compositions with distinct run-lengths
A001399(n-6) counts 3-part compositions in the complement.
A014311 intersected with A335488 ranks these compositions.
A140106 is the unordered case, with Heinz numbers A285508.
A261982 counts non-strict compositions of any length.
A001523 counts unimodal compositions, with complement A115981.
A007318 and A097805 count compositions by length.
A032020 counts strict compositions.
A047967 counts non-strict partitions, with Heinz numbers A013929.
A242771 counts triples that are not strictly increasing.

Programs

  • Mathematica
    Table[Length[Join@@Permutations/@Select[IntegerPartitions[n,{3}],!UnsameQ@@#&]],{n,0,100}] (* Gus Wiseman, Nov 11 2020 *)

Formula

Conjectures from Colin Barker, Dec 11 2018: (Start)
G.f.: x^3*(1 + 3*x + 5*x^2) / ((1 - x)^2*(1 + x)*(1 + x + x^2)).
a(n) = a(n-2) + a(n-3) - a(n-5) for n>7. (End)
Conjecture: a(n) = (3*n-k)/2 where k value has a cycle of 6 starting from n=3 of (7,6,3,10,3,6). - Bill McEachen, Aug 12 2025

A242771 Number of integer points in a certain quadrilateral scaled by a factor of n (another version).

Original entry on oeis.org

0, 0, 1, 3, 6, 9, 14, 19, 25, 32, 40, 48, 58, 68, 79, 91, 104, 117, 132, 147, 163, 180, 198, 216, 236, 256, 277, 299, 322, 345, 370, 395, 421, 448, 476, 504, 534, 564, 595, 627, 660, 693, 728, 763, 799, 836, 874, 912, 952, 992, 1033, 1075, 1118, 1161, 1206
Offset: 1

Author

Michael Somos, May 22 2014

Keywords

Comments

The quadrilateral is given by four vertices [(1/2, 1/3), (0, 1), (0, 0), (1, 0)] as an example on page 22 of Ehrhart 1967. Here the open line segment from (1/2, 1/3) to (0, 1) is included but the rest of the boundary is not. The sequence is denoted by d'(n).
From Gus Wiseman, Oct 18 2020: (Start)
Also the number of ordered triples of positive integers summing to n that are not strictly increasing. For example, the a(3) = 1 through a(7) = 14 triples are:
(1,1,1) (1,1,2) (1,1,3) (1,1,4) (1,1,5)
(1,2,1) (1,2,2) (1,3,2) (1,3,3)
(2,1,1) (1,3,1) (1,4,1) (1,4,2)
(2,1,2) (2,1,3) (1,5,1)
(2,2,1) (2,2,2) (2,1,4)
(3,1,1) (2,3,1) (2,2,3)
(3,1,2) (2,3,2)
(3,2,1) (2,4,1)
(4,1,1) (3,1,3)
(3,2,2)
(3,3,1)
(4,1,2)
(4,2,1)
(5,1,1)
A001399(n-6) counts the complement (unordered strict triples).
A014311 \ A333255 ranks these compositions.
A140106 is the unordered version.
A337484 is the case not strictly decreasing either.
A337698 counts these compositions of any length, with complement A000009.
A001399(n-6) counts unordered strict triples.
A001523 counts unimodal compositions, with complement A115981.
A007318 and A097805 count compositions by length.
A069905 counts unordered triples.
A218004 counts strictly increasing or weakly decreasing compositions.
A337483 counts triples either weakly increasing or weakly decreasing.
(End)

Examples

			G.f. = x^3 + 3*x^4 + 6*x^5 + 9*x^6 + 14*x^7 + 19*x^8 + 25*x^9 + 32*x^10 + ...
		

Programs

  • Magma
    [Floor((5*n-7)*(n-1)/12): n in [1..60]]; // Vincenzo Librandi, Jun 27 2015
  • Mathematica
    a[ n_] := Quotient[ 7 - 12 n + 5 n^2, 12];
    a[ n_] := With[ {o = Boole[ 0 < n], c = Boole[ 0 >= n], m = Abs@n}, Length @ FindInstance[ 0 < c + x && 0 < c + y && (2 x < c + m && 4 x + 3 y < o + 3 m || m < o + 2 x && 2 x + 3 y < c + 2 m), {x, y}, Integers, 10^9]];
    LinearRecurrence[{1,1,0,-1,-1,1},{0,0,1,3,6,9},90] (* Harvey P. Dale, May 28 2015 *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],!Less@@#&]],{n,0,15}] (* Gus Wiseman, Oct 18 2020 *)
  • PARI
    {a(n) = (7 - 12*n + 5*n^2) \ 12};
    
  • PARI
    {a(n) = if( n<0, polcoeff( x * (2 + x^2 + x^3 + x^4) / ((1 - x)^2 * (1 - x^6)) + x * O(x^-n), -n), polcoeff( x^3 * (1 + x + x^2 + 2*x^4) / ((1 - x)^2 * (1 - x^6)) + x * O(x^n), n))};
    

Formula

G.f.: x^3 * (1 + 2*x + 2*x^2) / (1 - x - x^2 + x^4 + x^5 - x^6) = (x^3 + x^4 + x^5 + 2*x^7) / ((1 - x)^2 * (1 - x^6)).
a(n) = floor( A147874(n) / 12).
a(-n) = A002789(n).
a(n+1) - a(n) = A010761(n).
For n >= 6, a(n) = A000217(n-2) - A001399(n-6). - Gus Wiseman, Oct 18 2020

A143975 a(n) = floor(n*(n+3)/3).

Original entry on oeis.org

1, 3, 6, 9, 13, 18, 23, 29, 36, 43, 51, 60, 69, 79, 90, 101, 113, 126, 139, 153, 168, 183, 199, 216, 233, 251, 270, 289, 309, 330, 351, 373, 396, 419, 443, 468, 493, 519, 546, 573, 601, 630, 659, 689, 720, 751, 783, 816, 849, 883, 918, 953, 989, 1026, 1063, 1101
Offset: 1

Author

Clark Kimberling, Sep 06 2008

Keywords

Comments

Fourth diagonal of A143974, associated with counting unit squares in a lattice.

Examples

			Main diagonal of A143974: (0,1,3,5,8,12,...) = A000212;
2nd diagonal: (0,2,4,6,10,14,18,...) = A128422;
3rd diagonal: (1,2,5,8,11,16,21,...) = A032765;
4th diagonal: (1,3,6,9,13,18,23,...) = A143975.
		

Crossrefs

Programs

  • Magma
    [Floor(n*(n+3)/3): n in [1..60]]; // Vincenzo Librandi, May 08 2011
  • Mathematica
    a[n_] := Floor[n*(n+3)/3]; Array[a, 60] (* Amiram Eldar, Oct 01 2022 *)

Formula

a(n) = floor(n*(n+3)/3).
From R. J. Mathar, Oct 05 2009: (Start)
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
G.f.: x*(-1 - x - x^2 + x^3)/( (1 + x + x^2) * (x-1)^3). (End)
9*a(n) = 3*n^2 + 9*n - 2 + A099837(n+3). - R. J. Mathar, Apr 26 2022
Sum_{n>=1} 1/a(n) = 4/3 + (tan((sqrt(13)+2)*Pi/6) - cot((sqrt(13)+1)*Pi/6)) * Pi/sqrt(13). - Amiram Eldar, Oct 01 2022
E.g.f.: (exp(x)*(3*x*(4 + x) - 2) + 2*exp(-x/2)*cos(sqrt(3)*x/2))/9. - Stefano Spezia, Oct 24 2022

A166387 a(n) = sum (floor (j^2/n), 1 <= j <= n-1) - floor ((n-1)(n-2)/3), n >= 2.

Original entry on oeis.org

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

Author

Keywords

Comments

a(n) = 0 when n = 2, any prime of the form 4k+1 with k >= 1 and any product of these without repetition, e.g. 2x5x17.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Floor[k^2/n], {k, 1, n - 1}] - Floor[(n - 1)*(n - 2)/3], {n, 2, 100}] (* G. C. Greubel, May 12 2016 *)
  • PARI
    a(n) = sum(j=1,n-1, j^2\n) - ((n-1)*(n-2))\3 \\ Michel Marcus, Jun 21 2013

Formula

a(n) = A166375(n) - A128422(n).

Extensions

Corrected and enhanced by Christopher Hunt Gribble, Dec 01 2009
Showing 1-10 of 11 results. Next