login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117484 Number of triangular numbers mod n. 3
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, 12, 16, 32, 12, 18, 12, 16, 19, 20, 14, 24, 21, 16, 22, 24, 12, 24, 24, 32, 22, 22, 18, 28, 27, 22, 18, 32, 20, 30, 30, 24, 31, 32, 16, 64, 21, 24, 34, 36, 24, 24, 36, 32, 37, 38, 22 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Same as A000224 (number of squares mod n) for n odd, since there we can divide by 2 and then complete the square.

From David Morales Marciel, Jul 13 2015: (Start)

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:

(1) Define counter c=1.

(2) Start at any desired vertex.

(3) Mark the current vertex as a "final vertex".

(4) Advance clockwise c vertices.

(5) Set c=c+1.

(6) Repeat from (3).

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.

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.

(End)

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

David Morales Marciel, Bouncing patterns of some modulo-n series (n-gons 3 to 14, 16, 17 and 27), according to the algorithm explained in the comments. Current sequence belongs to the bouncing pattern of the 3-gon sample (first at the top).

FORMULA

Multiplicative with a(2^e) = 2^e, a(p^e) = floor(p^(e+1)/(2p+2))+1 for p > 2.

EXAMPLE

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

MAPLE

a:= proc(n) local F, f;

F:= ifactors(n)[2];

mul(seq(`if`(f[1]=2, 2^f[2], floor(f[1]^(f[2]+1)/(2*f[1]+2))+1), f=F))

end proc:

map(a, [$1..100]); # Robert Israel, Jul 13 2015

MATHEMATICA

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 *)

CROSSREFS

Cf. A000224.

Sequence in context: A094950 A087874 A166267 * A086835 A046701 A140472

Adjacent sequences:  A117481 A117482 A117483 * A117485 A117486 A117487

KEYWORD

mult,easy,nonn

AUTHOR

Franklin T. Adams-Watters, Apr 25 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 15 04:23 EST 2019. Contains 329991 sequences. (Running on oeis4.)