login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A330249 a(0) = 0; for n > 0, a(n) = n + a((Sum_{k=0..n-1} a(k)) mod n). 2
0, 1, 3, 4, 4, 8, 9, 8, 16, 25, 26, 19, 16, 38, 39, 24, 16, 18, 22, 38, 59, 45, 81, 61, 28, 41, 67, 66, 95, 37, 69, 112, 40, 71, 50, 147, 183, 77, 75, 120, 62, 91, 119, 104, 94, 116, 55, 63, 70, 196, 145, 75, 92, 91, 170, 110, 176, 177, 241, 109 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Samuel B. Reid, Table of n, a(n) for n = 0..10000

EXAMPLE

a(1) = 1 + a(0 mod 1) = 1.

a(2) = 2 + a((0+1) mod 2) = 3.

a(3) = 3 + a((0+1+3) mod 3) = 4.

a(4) = 4 + a((0+1+3+4) mod 4) = 4.

MATHEMATICA

a[0] = 0; a[n_] := a[n] = n + a[Mod[Sum[a[k], {k, 0, n-1}], n]]; Array[a, 100, 0] (* Amiram Eldar, Dec 07 2019 *)

PROG

(PARI) lista(nn) = {my(v=vector(nn+1), s=0); v[1]=0; for(n=1, nn, v[n+1]=n+v[s%n+1]; s+=v[n+1]); v; } \\ Jinyuan Wang, Dec 07 2019

CROSSREFS

Cf. A330256, A066910.

Sequence in context: A294113 A240875 A127735 * A075550 A292729 A328989

Adjacent sequences:  A330246 A330247 A330248 * A330250 A330251 A330252

KEYWORD

nonn

AUTHOR

Samuel B. Reid, Dec 06 2019

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 August 12 17:17 EDT 2020. Contains 336439 sequences. (Running on oeis4.)