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.

A174871 Numbers k such that the k-th triangular number ends in 6 or 8.

This page as a plain text file.
%I A174871 #36 May 23 2024 10:34:06
%S A174871 3,7,8,11,12,16,23,27,28,31,32,36,43,47,48,51,52,56,63,67,68,71,72,76,
%T A174871 83,87,88,91,92,96,103,107,108,111,112,116,123,127,128,131,132,136,
%U A174871 143,147,148,151,152,156,163,167,168,171,172,176,183,187,188,191,192,196
%N A174871 Numbers k such that the k-th triangular number ends in 6 or 8.
%C A174871 Observed to be the same as when all consecutive terms in the sequence a(0) = n+1, a(k+1) = a(k)^2 - a(k) + 1 will eventually end in 57, 93, 57, 93, ... - _Eugene Dorokhin_, Aug 28 2018
%H A174871 Jinyuan Wang, <a href="/A174871/b174871.txt">Table of n, a(n) for n = 1..10000</a>
%H A174871 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,1,-1). [_R. J. Mathar_, Apr 15 2010]
%F A174871 From _R. J. Mathar_, Apr 15 2010 (Start)
%F A174871 a(n) = a(n-1) + a(n-6) - a(n-7).
%F A174871 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)
%e A174871 11 is in the sequence because 11*12/2 = 66 ends in 6. - _Emeric Deutsch_, Apr 10 2010
%p A174871 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
%t A174871 LinearRecurrence[{1, 0, 0, 0, 0, 1, -1},{3, 7, 8, 11, 12, 16, 23},50] (* _Stefano Spezia_, Sep 01 2018 *)
%t A174871 Position[Accumulate[Range[200]],_?(Mod[#,10]==6 ||Mod[#,10]==8&)]//Flatten (* _Harvey P. Dale_, May 23 2024 *)
%o A174871 (PARI) is(n) = #setintersect([n*(n+1)/2%10], [6, 8])==1 \\ _Felix Fröhlich_, Sep 01 2018
%Y A174871 Cf. A008954. - _R. J. Mathar_, Apr 15 2010
%K A174871 nonn,easy
%O A174871 1,1
%A A174871 _J. Lowell_, Mar 31 2010
%E A174871 More terms from _Emeric Deutsch_, Apr 10 2010