A174871 Numbers k such that the k-th triangular number ends in 6 or 8.
3, 7, 8, 11, 12, 16, 23, 27, 28, 31, 32, 36, 43, 47, 48, 51, 52, 56, 63, 67, 68, 71, 72, 76, 83, 87, 88, 91, 92, 96, 103, 107, 108, 111, 112, 116, 123, 127, 128, 131, 132, 136, 143, 147, 148, 151, 152, 156, 163, 167, 168, 171, 172, 176, 183, 187, 188, 191, 192, 196
Offset: 1
Examples
11 is in the sequence because 11*12/2 = 66 ends in 6. - _Emeric Deutsch_, Apr 10 2010
Links
- Jinyuan Wang, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1). [_R. J. Mathar_, Apr 15 2010]
Crossrefs
Cf. A008954. - R. J. Mathar, Apr 15 2010
Programs
-
Maple
a := proc (n) if `mod`((1/2)*n*(n+1), 10) = 6 or `mod`((1/2)*n*(n+1), 10) = 8 then n else end if end proc: seq(a(n), n = 1 .. 200); # Emeric Deutsch, Apr 10 2010
-
Mathematica
LinearRecurrence[{1, 0, 0, 0, 0, 1, -1},{3, 7, 8, 11, 12, 16, 23},50] (* Stefano Spezia, Sep 01 2018 *) Position[Accumulate[Range[200]],?(Mod[#,10]==6 ||Mod[#,10]==8&)]//Flatten (* _Harvey P. Dale, May 23 2024 *)
-
PARI
is(n) = #setintersect([n*(n+1)/2%10], [6, 8])==1 \\ Felix Fröhlich, Sep 01 2018
Formula
From R. J. Mathar, Apr 15 2010 (Start)
a(n) = a(n-1) + a(n-6) - a(n-7).
G.f.: x*(3 + 4*x + x^2 + 3*x^3 + x^4 + 4*x^5 + 4*x^6)/ ((1+x) * (x^2-x+1) * (1+x+x^2) * (x-1)^2). (End)
Extensions
More terms from Emeric Deutsch, Apr 10 2010
Comments