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!)
A282894 Remainder when sum of first n terms of A004001 is divided by A004001(n). 3
0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 4, 4, 6, 6, 6, 6, 6, 7, 9, 0, 0, 2, 5, 5, 8, 8, 8, 10, 10, 10, 10, 10, 9, 9, 10, 12, 15, 15, 18, 22, 3, 3, 7, 12, 12, 17, 17, 17, 21, 26, 26, 1, 1, 1, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 2, 0, 34, 35, 0, 2, 2, 4, 7, 11, 16, 16, 21, 27, 34, 34, 41, 2, 2, 9, 9, 9, 15, 22, 30, 30, 38, 47, 47, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,10
LINKS
FORMULA
a(n) = (Sum_{k=1..n} A004001(k)) mod A004001(n).
EXAMPLE
a(6) = 1 since Sum_{k=1..6} A004001(k) = 1 + 1 + 2 + 2 + 3 + 4 = 13 and remainder when 13 is divided by A004001(6) = 4 is 1.
MAPLE
A004001:= proc(n) option remember; procname(procname(n-1)) +procname(n-procname(n-1)) end proc:
A004001(1):= 1: A004001(2):= 1:
L:= ListTools[PartialSums](map(A004001, [$1..1000])):
seq(L[i] mod A004001(i), i=1..1000); # Robert Israel, Feb 26 2017
MATHEMATICA
a[1] = 1; a[2] = 1; a[n_] := a[n] = a[a[n - 1]] + a[n - a[n - 1]]; MapIndexed[Last@ QuotientRemainder[#1, a@ First@ #2] &, Accumulate@ Table[a@ n, {n, 96}]] (* Michael De Vlieger, Feb 24 2017, after Robert G. Wilson v at A004001 *)
PROG
(PARI) a=vector(1000); a[1]=a[2]=1; for(n=3, #a, a[n]=a[a[n-1]]+a[n-a[n-1]]); vector(#a, n, sum(k=1, n, a[k]) % a[n])
(PARI) first(n)=my(v=vector(n), s); v[1]=v[2]=1; for(k=3, n, v[k]=v[v[k-1]]+v[k-v[k-1]]); for(k=1, n, s+=v[k]; v[k]=s%v[k]); v \\ Charles R Greathouse IV, Feb 26 2017
CROSSREFS
Sequence in context: A348769 A058043 A251546 * A162550 A191682 A113724
KEYWORD
nonn,look
AUTHOR
Altug Alkan, Feb 24 2017
STATUS
approved

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 19 13:40 EDT 2024. Contains 371792 sequences. (Running on oeis4.)