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 A175630 #11 Jun 28 2020 18:58:35 %S A175630 0,1,1,2,4,0,3,7,2,7,1,7,0,7,15,7,16,7,17,7,18,7,19,7,20,7,21,7,22,7, %T A175630 23,7,24,7,25,7,26,7,27,7,28,7,29,7,30,7,31,7,32,7,33,7,34,7,35,7,36, %U A175630 7,37,7,38,7,39,7,40,7,41,7,42,7,43,7,44,7,45,7,46,7,47,7,48,7,49,7,50,7,51 %N A175630 a(n) = n-th pentagonal number mod (n+2). %C A175630 k>=0, a(7+2*k)=7, (for odd indices >=7), %C A175630 also k>=0, a(14+2*k)=15+k, (for even indices >=14). %H A175630 Harvey P. Dale, <a href="/A175630/b175630.txt">Table of n, a(n) for n = 0..1000</a> %F A175630 From _Chai Wah Wu_, Oct 12 2018: (Start) %F A175630 a(n) = 2*a(n-2) - a(n-4) for n > 16. %F A175630 G.f.: x*(-14*x^15 + 16*x^13 - 7*x^8 + 9*x^6 - 4*x^5 - 3*x^4 + 2*x^3 + x + 1)/((x - 1)^2*(x + 1)^2). (End) %t A175630 Table[Mod[n(3n-1)/2,n+2],{n,0,200}] %t A175630 With[{nn=90},Mod[PolygonalNumber[5,Range[0,nn]],Range[2,nn+2]]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jun 28 2020 *) %Y A175630 Cf. A000326 Pentagonal numbers:n(3n-1)/2, A179820 a(n) = n-th triangular number mod (n+2). %K A175630 nonn %O A175630 0,4 %A A175630 _Zak Seidov_, Jul 29 2010