login
The OEIS is supported by the many generous donors to the OEIS 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

%I #27 Dec 19 2019 08:37:20

%S 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,

%T 41,67,66,95,37,69,112,40,71,50,147,183,77,75,120,62,91,119,104,94,

%U 116,55,63,70,196,145,75,92,91,170,110,176,177,241,109

%N a(0) = 0; for n > 0, a(n) = n + a((Sum_{k=0..n-1} a(k)) mod n).

%H Samuel B. Reid, <a href="/A330249/b330249.txt">Table of n, a(n) for n = 0..10000</a>

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

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

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

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

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

%o (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

%Y Cf. A330256, A066910.

%K nonn

%O 0,3

%A _Samuel B. Reid_, Dec 06 2019

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)