login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309869 Let b(0)=n, b(1)=n+1, b(2)=n+2, and b(k)=(b(k-3)*b(k-2)*b(k-3)) mod (b(k-3)+b(k-2)+b(k-1)) for k>=3. Continue until either b(k)=0, in which case a(n)=k, or the ordered triple [b(k-2),b(k-1),b(k)] has appeared before, in which case a(n)=-k. If neither of these ever occur, then a(n)=0. 1
3, 50, 3, 3, 10, 3, 3, -17, 3, 3, 11, 3, 3, 5, 3, 3, 6, 3, 3, 5, 3, 3, -120, 3, 3, 6, 3, 3, -121, 3, 3, 5, 3, 3, 13, 3, 3, -1688, 3, 3, -24, 3, 3, 7, 3, 3, 15, 3, 3, -21, 3, 3, 32, 3, 3, -191, 3, 3, 19, 3, 3, -12, 3, 3, 36, 3, 3, 14, 3, 3, -194, 3, 3, 17, 3, 3, 16, 3, 3, 22, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

If b(k)=0 we get b(k+1)=0, b(k+2)=0, and the sequence ends because 0 mod 0 is undefined. If [b(k-2),b(k-1),b(k)] has appeared before, the sequence has entered a cycle.

a(n)=3 unless n==2 (mod 3).

Can a(n)=0?

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

FORMULA

a(26-6*(-1)^k+132*k)=5.  Conjecture: the only other n for which a(n)=5 are 14 and 32. - Robert Israel, Aug 21 2019

EXAMPLE

a(14)=5 because b(3)=(14*15*16) mod (14+15+16)=30, b(4)=(15*16*30) mod (15+16+30)=2, and b(5)=(16*30*2) mod (16+30+2)=0.

a(8)=-17 because (b(15),b(16),b(17))=(21,18,18)=(b(11),b(12),b(13)).

MAPLE

f:= proc(m) local a, b, c, t, n, s, S;

  a:= m; b:= m+1; c:= m+2;

  S:= {[m, m+1, m+2]};

  for n from 3 to 10^6 do

    t:= (a*b*c) mod (a+b+c);

    if t = 0 then return n fi;

    a:= b; b:= c; c:= t;

    s:= [a, b, c];

    if member(s, S) then return -n fi;

    S:= S union {s};

  od;

  FAIL

end proc:

map(f, [$1..100]);

CROSSREFS

Sequence in context: A063893 A291707 A145572 * A012857 A246221 A249249

Adjacent sequences:  A309866 A309867 A309868 * A309870 A309871 A309872

KEYWORD

sign

AUTHOR

J. M. Bergot and Robert Israel, Aug 20 2019

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 20:44 EDT 2021. Contains 343990 sequences. (Running on oeis4.)