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 A117484 #48 Dec 20 2024 08:54:05 %S A117484 1,2,2,4,3,4,4,8,4,6,6,8,7,8,6,16,9,8,10,12,8,12,12,16,11,14,11,16,15, %T A117484 12,16,32,12,18,12,16,19,20,14,24,21,16,22,24,12,24,24,32,22,22,18,28, %U A117484 27,22,18,32,20,30,30,24,31,32,16,64,21,24,34,36,24,24,36,32,37,38,22 %N A117484 Number of triangular numbers mod n. %C A117484 Same as A000224 (number of squares mod n) for n odd, since there we can divide by 2 and then complete the square. %C A117484 From _David Morales Marciel_, Jul 13 2015: (Start) %C A117484 a(n) is also the total number of vertices of an n-gon that are a "final vertex" of a bouncing pattern representing the modulo-n series (an image of the bouncing pattern is included in the LINKS section). It is defined by the following algorithm: %C A117484 (1) Define counter c=1. %C A117484 (2) Start at any desired vertex. %C A117484 (3) Mark the current vertex as a "final vertex". %C A117484 (4) Advance clockwise c vertices. %C A117484 (5) Set c=c+1. %C A117484 (6) Repeat from (3). %C A117484 The pattern of "final vertices" is cyclic: after some repetitions of steps (3)-(6), the marking of vertices is repeated and it is possible to count how many vertices of the n-gon contain a "final vertex" mark. %C A117484 Examples: trivial case: a(n)=1 (one vertex is always a "final vertex"). From that point following the algorithm: a(2)=2 (segment, both vertices are a "final vertex"), a(3)=2 (triangle, only two vertices are "final vertex"), etc. %C A117484 (End) %H A117484 Robert Israel, <a href="/A117484/b117484.txt">Table of n, a(n) for n = 1..10000</a> %H A117484 Nicholas John Bizzell-Browning, <a href="https://bura.brunel.ac.uk/handle/2438/29960">LIE scales: Composing with scales of linear intervallic expansion</a>, Ph. D. Thesis, Brunel Univ. (UK, 2024). See p. 21. %H A117484 David Morales Marciel, <a href="/A117484/a117484.png">Bouncing patterns of some modulo-n series (n-gons 3 to 14, 16, 17 and 27)</a>, according to the algorithm explained in the comments. Current sequence belongs to the bouncing pattern of the 3-gon sample (first at the top). %F A117484 Multiplicative with a(2^e) = 2^e, a(p^e) = floor(p^(e+1)/(2p+2))+1 for p > 2. %e A117484 When n=3, there is no triangular number which is congruent to 2 (mod 3) but only == 0 or 1 (mod 3), so a(3) = 2. - _Robert G. Wilson v_, Sep 16 2015 %p A117484 a:= proc(n) local F, f; %p A117484 F:= ifactors(n)[2]; %p A117484 mul(seq(`if`(f[1]=2, 2^f[2], floor(f[1]^(f[2]+1)/(2*f[1]+2))+1), f=F)) %p A117484 end proc: %p A117484 map(a, [$1..100]); # _Robert Israel_, Jul 13 2015 %t A117484 f[n_] := Block[{fi = FactorInteger@ n, k = t = 1}, lng = 1 + Length@ fi; While[k < lng, t = t*If[ fi[[k, 1]] == 2, 2^fi[[k, 2]], Floor[1 + fi[[k, 1]]^(fi[[k, 2]] + 1)/(2 + 2fi[[k, 1]]) ]]; k++]; t]; Array[f, 75] (* _Robert G. Wilson v_, Sep 16 2015, after _Robert Israel_ *) %o A117484 (PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,1] == 2, 2^f[i,2], (f[i,1]^(f[i,2]+1)\(2*f[i,1] + 2)) + 1));} \\ _Amiram Eldar_, Sep 05 2023 %Y A117484 Cf. A000224. %K A117484 mult,easy,nonn,nice %O A117484 1,2 %A A117484 _Franklin T. Adams-Watters_, Apr 25 2006