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!)
A069214 Let u(n,k) be the recursion defined by u(n,1)=1, u(n,2)=2, u(n,3)=n, and u(n,k+3) = (u(n,k+2) + u(n,k+1))/u(n,k) if u(n,k) divides u(n,k+2) + u(n,k+1), u(n,k+3) = u(n,k) otherwise. Then u(n,k) is periodic and a(n) = Max(u(n,k), k >= 1). 0
5, 4, 5, 6, 8, 8, 11, 10, 14, 12, 17, 14, 20, 16, 23, 18, 26, 20, 29, 22, 32, 24, 35, 26, 38, 28, 41, 30, 44, 32, 47, 34, 50, 36, 53, 38, 56, 40, 59, 42, 62, 44, 65, 46, 68, 48, 71, 50, 74, 52, 77, 54, 80, 56, 83, 58, 86, 60, 89, 62, 92, 64, 95, 66, 98, 68, 101, 70, 104, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Let p(n) denote the period of u(n,k) (i.e., p(n) is the smallest integer such that u(n,k) = u(n, k+p(n))). p(n) = 22,12,22,21,15,9,15,9,15,9,... for n = 1,2,3,4,5,6,.... Hence for n > 4, p(n) = 15 if n is odd; p(n) = 9 if n is even.
LINKS
FORMULA
a(1)=5, a(2n)=2n+2, a(2n+1)=3n+2.
a(n) = (5*n+5-(n-3)*(-1)^n)/4 for n>=2, with a(1)=5. - Wesley Ivan Hurt, Sep 05 2022
EXAMPLE
E.g., for k=1..15, u(7, k) = 1, 2, 7, 9, 8, 7, 9, 2, 7, 1, 4, 7, 11, 4, 7; hence a(7)=11.
MATHEMATICA
LinearRecurrence[{0, 2, 0, -1}, {5, 4, 5, 6}, 70] (* Georg Fischer, Nov 23 2022 *)
PROG
(Perl)
use strict; use integer;
for (my $n = 1; $n <= 70; $n ++) { my @u = (0, 1, 2, $n);
for (my $k = 1; $k <= 64; $k ++) {
my $sum = $u[$k + 1] + $u[$k + 2];
$u[$k + 3] = ($sum % $u[$k] == 0) ? $sum / $u[$k] : $u[$k];
}
my $max = 0;
for (my $k = 1; $k < scalar(@u); $k ++) {
if ($max < $u[$k]) { $max = $u[$k]; }
}
print "$n $max\n";
} # Georg Fischer, Nov 23 2022
CROSSREFS
Sequence in context: A200293 A211006 A358789 * A119807 A254181 A245018
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 11 2002
EXTENSIONS
a(65), a(67), a(69) corrected by Georg Fischer, Nov 23 2022
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 23 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)