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!)
A072987 FIBMOD numbers: a(1) = a(2) = 1, a(n) = a(n-1) mod (n-1) + a(n-2) mod (n-2). 3

%I #31 Dec 27 2023 11:55:15

%S 1,1,1,2,3,5,8,6,7,13,10,13,11,12,23,20,12,16,28,25,14,19,33,29,15,20,

%T 35,28,8,8,16,24,40,31,38,34,37,34,34,68,62,49,28,35,63,53,25,32,57,

%U 40,48,88,84,67,44,57,45,46,91,78,50,68,56,62,118,115,102

%N FIBMOD numbers: a(1) = a(2) = 1, a(n) = a(n-1) mod (n-1) + a(n-2) mod (n-2).

%C Superseeker suggested that this sequence might be related to A096534 via the transformation T026 (coefficients of Sn(z)/(1+z)) for a(3) to a(76). - _Eli Jaffe_, Sep 16 2015

%C Superseeker's reply seems to be true: it appears that the present sequence has generating function equal to (1+x)*(1+x*G(X)), where G(x) is the g.f. for A096534. - _N. J. A. Sloane_, Nov 23 2015

%H Danny Rorabaugh, <a href="/A072987/b072987.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) < 2n.

%F A096534(n) == a(n) mod n. - _Danny Rorabaugh_, Oct 13 2015

%e For n=8, a(8) = (a(7) mod 7) + (a(6) mod 6) = 1 + 5 = 6. - _Eli Jaffe_, Sep 16 2015

%p a:= proc(n) option remember; `if`(n<3, 1,

%p add(irem(a(n-j), n-j), j=1..2))

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Mar 20 2018

%t a = {1, 1}; Do[AppendTo[a, Mod[a[[n - 1]], n - 1] + Mod[a[[n - 2]], n - 2]], {n, 3, 76}]; a (* _Michael De Vlieger_, Sep 17 2015 *)

%t RecurrenceTable[{a[1]==a[2]==1,a[n]==Mod[a[n-1],n-1]+Mod[a[n-2],n-2]},a,{n,80}] (* _Harvey P. Dale_, Oct 28 2017 *)

%o (Magma) I:=[1, 1]; [n le 2 select I[n] else Self(n-1) mod (n-1) + Self(n-2) mod (n-2): n in [1..80]]; // _Vincenzo Librandi_, Sep 26 2015

%o (PARI) a=vector(10^5); a[1]=a[2]=1; for(n=3, #a, a[n]=a[n-1]%(n-1)+a[n-2]%(n-2)); a \\ _Altug Alkan_, Mar 20 2018

%Y Cf. A096534.

%K easy,nonn

%O 1,4

%A _Benoit Cloitre_, Aug 14 2002

%E Corrected by _Harvey P. Dale_, Oct 28 2017

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 14:32 EDT 2024. Contains 371960 sequences. (Running on oeis4.)