The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A283025 Remainder when sum of first n terms of A005185 is divided by n. 6
0, 0, 1, 3, 0, 2, 5, 0, 3, 6, 9, 2, 6, 10, 1, 5, 10, 16, 3, 9, 15, 21, 4, 13, 20, 1, 9, 17, 25, 3, 14, 22, 30, 7, 18, 27, 0, 11, 21, 32, 3, 14, 26, 38, 5, 16, 27, 46, 8, 19, 35, 49, 8, 23, 38, 51, 11, 25, 41, 57, 12, 27, 50, 2, 15, 35, 52, 67, 19, 40, 58, 5, 25, 44, 64, 7, 28, 47, 67, 9, 31, 52, 73, 13, 34, 56, 80, 16, 38, 62, 86, 18 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Numbers n such that a(n) = 0 are 1, 2, 5, 8, 37, 99, 1580, 42029, ...
Sequence is a mixture of regularity and irregularity. - Douglas Hofstadter, Mar 03 2017
LINKS
FORMULA
a(n) = (Sum_{k=1..n} A005185(k)) mod n.
a(n) = A076268(n) mod n.
EXAMPLE
a(4) = 3 since Sum_{k=1..4} A005185(k) = 1 + 1 + 2 + 3 = 7 and remainder when 7 is divided by 4 is 3.
MAPLE
A005185:= proc(n) option remember; procname(n-procname(n-1)) +procname(n-procname(n-2)) end proc:
A005185(1):= 1: A005185(2):= 1:
L:= ListTools[PartialSums](map(A005185, [$1..1000])):
seq(L[i] mod i, i=1..1000); # Robert Israel, Feb 28 2017
MATHEMATICA
h[1]=h[2]=1; h[n_]:=h[n]= h[n-h[n-1]] + h[n-h[n-2]]; Mod[ Accumulate[h /@ Range[100]], Range[100]] (* Giovanni Resta, Feb 27 2017 *)
PROG
(PARI) a=vector(1000); a[1]=a[2]=1; for(n=3, #a, a[n]=a[n-a[n-1]]+a[n-a[n-2]]); vector(#a, n, sum(k=1, n, a[k]) % n)
(PARI) first(n)=my(v=vector(n), s); v[1]=v[2]=1; for(k=3, n, v[k]=v[k-v[k-1]]+v[k-v[k-2]]); for(k=1, n, s+=v[k]; v[k]=s%k); v \\ after Charles R Greathouse IV at A282891
CROSSREFS
Sequence in context: A261163 A292244 A208329 * A089598 A117139 A159959
KEYWORD
nonn,look
AUTHOR
Altug Alkan, Feb 27 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 June 8 17:52 EDT 2024. Contains 373227 sequences. (Running on oeis4.)