login
Triangular numbers congruent to 1 or 5 mod 6.
3

%I #35 Aug 18 2022 10:31:20

%S 1,55,91,253,325,595,703,1081,1225,1711,1891,2485,2701,3403,3655,4465,

%T 4753,5671,5995,7021,7381,8515,8911,10153,10585,11935,12403,13861,

%U 14365,15931,16471,18145,18721,20503,21115,23005,23653,25651,26335,28441

%N Triangular numbers congruent to 1 or 5 mod 6.

%C Or, except for the first term, triangular numbers the least prime factor of which is >=5.

%C There are no triangular numbers that are congruent to 5 mod 6. - _Amiram Eldar_, Aug 18 2022

%H Harvey P. Dale, <a href="/A128880/b128880.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).

%F 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.

%F 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

%F From _Colin Barker_, Jan 26 2016: (Start)

%F a(n) = (36*n^2+18*(-1)^n*n-36*n-9*(-1)^n+11)/2.

%F a(n) = 18*n^2-9*n+1 for n even.

%F a(n) = 18*n^2-27*n+10 for n odd.

%F (End)

%F Sum_{n>=1} 1/a(n) = Pi/3. - _Amiram Eldar_, Aug 18 2022

%t 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}]

%t Select[Accumulate[Range[500]],MemberQ[{1,5},Mod[#,6]]&] (* _Harvey P. Dale_, Sep 28 2013 *)

%o (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

%Y Intersection of A000217 and A007310.

%K nonn,easy

%O 1,2

%A _Zak Seidov_, Apr 18 2007, Apr 25 2007