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.
%I A080341 #17 May 30 2022 16:32:32 %S A080341 1,5,10,17,27,38,51,67,84,103,125,148,173,201,230,261,295,330,367,407, %T A080341 448,491,537,584,633,685,738,793,851,910,971,1035,1100,1167,1237,1308, %U A080341 1381,1457,1534,1613,1695,1778,1863,1951,2040,2131,2225,2320,2417 %N A080341 Sum of the first n terms that are congruent to 1, 4 or 5 mod 6 (A047259). %C A080341 Number of edges needed in a sector of a hexagon of size n paved by rhombi coming from triangular/hexagonal lattices. %H A080341 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,1,-2,1). %F A080341 a(n) = n^2+(n+1)/3 with integer division, that is n mod 3 = 0 : n^2+n/3 n mod 3 = 1 : n^2+(n-1)/3 n mod 3 = 2 : n^2+(n+1)/3. %F A080341 G.f.: x*(1+3*x+x^2+x^3)/(1-x)^3/(1+x+x^2). [_Colin Barker_, Feb 12 2012] %t A080341 Accumulate[Select[Range[100],MemberQ[{1,4,5},Mod[#,6]]&]] (* _Harvey P. Dale_, Aug 16 2012 *) %o A080341 (Java or beanShell script) for(int i=1, s=m=0; i<40; i++) { m= i%6; if((m==1)||(m==4)||(m==5)) System.out.print((s+=i)+", "); } for(int i=1; i<20; i++) System.out.print((i*i+(i+1)/3)+" "); %Y A080341 Cf. A047259. %K A080341 easy,nonn %O A080341 1,2 %A A080341 Christian Mercat (Integer.Sequence(AT)entrelacs.net), Mar 20 2003