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!)
A215525 a(0)=a(1)=1, a(n) = a(n-1) + a(a(n-2) mod n). 2
1, 1, 2, 3, 5, 8, 16, 17, 18, 36, 54, 57, 73, 81, 84, 100, 105, 205, 305, 405, 413, 429, 634, 734, 788, 824, 842, 926, 928, 1854, 2782, 3606, 6388, 6424, 9206, 9611, 10453, 11381, 11384, 17772, 18560, 18965, 30349, 30351, 36775, 37204, 37633, 38559, 38560, 75764 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Same formula, seed {0,1} : 0, 1, 1, 2, 3, 4, 6, 9, 15, 15, 19, 22, 31, 46, 48, 49, 49, 98, 144, 146, 149, 298, 396, 792, 823, 921, 1019, 1021, 1043, 1049, 1841, 2860
Same formula, seed {1,2} : 1, 2, 4, 8, 9, 17, 25, 33, 35, 60, 77, 94, 111, 119, 238, 476, 714, 715, 826, 937, 962, 1081, 1795, 1796, 2733, 3814, 3822, 3855, 4093, 7948
LINKS
FORMULA
a(0)=a(1)=1, for n>=2, a(n) = a(n-1) + a(a(n-2) mod n).
MATHEMATICA
Fold[Append[#1, #1[[-1]] + #1[[1 + Mod[#1[[-2]], #2]]]] &, {1, 1}, Range[2, 49]] (* Ivan Neretin, Sep 07 2017 *)
PROG
(Python)
a = [1]*1000
for n in range(2, 77):
..print(a[n-2], end=', ')
..a[n] = a[n-1] + a[a[n-2] % n]
# Corrected by Derek Orr, Sep 25 2014
CROSSREFS
Cf. A215488.
Sequence in context: A096592 A305370 A192571 * A192645 A050295 A121649
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Aug 14 2012
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 24 06:03 EDT 2024. Contains 371918 sequences. (Running on oeis4.)