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.

A128880 Triangular numbers congruent to 1 or 5 mod 6.

Original entry on oeis.org

1, 55, 91, 253, 325, 595, 703, 1081, 1225, 1711, 1891, 2485, 2701, 3403, 3655, 4465, 4753, 5671, 5995, 7021, 7381, 8515, 8911, 10153, 10585, 11935, 12403, 13861, 14365, 15931, 16471, 18145, 18721, 20503, 21115, 23005, 23653, 25651, 26335, 28441
Offset: 1

Views

Author

Zak Seidov, Apr 18 2007, Apr 25 2007

Keywords

Comments

Or, except for the first term, triangular numbers the least prime factor of which is >=5.
There are no triangular numbers that are congruent to 5 mod 6. - Amiram Eldar, Aug 18 2022

Crossrefs

Intersection of A000217 and A007310.

Programs

  • Mathematica
    c=0;Do[tr=n(n+1)/2;If[Abs[Mod[tr,6]]==1,c++;a[c]=tr],{n,300}];Table[a[i],{i,c}]
    Select[Accumulate[Range[500]],MemberQ[{1,5},Mod[#,6]]&] (* Harvey P. Dale, Sep 28 2013 *)
  • PARI
    Vec(-x*(1+54*x+34*x^2+54*x^3+x^4)/((1+x)^2*(x-1)^3) + O(x^100)) \\ Colin Barker, Jan 26 2016

Formula

a(1)=Tr(1), a(2)=Tr(10), where Tr(k)=k(k+1)/2 is triangular number; for n>=3 a(n)=Tr(k(n)), where k(n)=k(n-2)+12 with k(1)=1, k(2)=10.
G.f.: -x*(1+54*x+34*x^2+54*x^3+x^4) / ( (1+x)^2*(x-1)^3 ). - R. J. Mathar, Jul 07 2015
From Colin Barker, Jan 26 2016: (Start)
a(n) = (36*n^2+18*(-1)^n*n-36*n-9*(-1)^n+11)/2.
a(n) = 18*n^2-9*n+1 for n even.
a(n) = 18*n^2-27*n+10 for n odd.
(End)
Sum_{n>=1} 1/a(n) = Pi/3. - Amiram Eldar, Aug 18 2022