Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)
A330241 a(n) is the greatest k such that there is an increasing sequence of positive integers j(0),j(1),...,j(k) such that n == i (mod j(i)) for each i. 2
0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 3, 4, 1, 2, 1, 2, 3, 4, 3, 4, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, 3, 4, 3, 4, 1, 2, 3, 4, 5, 6, 3, 4, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
If n == -1 (mod A003418(k)), then a(n) == j mod (j+1) for j <= k-1, so a(n) >= k-1. In particular, the sequence is unbounded.
a(n) = 1 if n is in A008864.
a(n+1) <= a(n)+1, with equality if n is even.
LINKS
EXAMPLE
a(5) = 2 because 5 == 0 (mod 1), == 1 (mod 2), == 2 (mod 3), but there is no j > 3 with 5 == 3 (mod j).
a(11) = 4 because 11 == 0 (mod 1), == 1 (mod 2), == 2 (mod 3), == 3 (mod 4), == 4 (mod 7), but there is no j > 7 with 11 == 5 (mod j).
MAPLE
F:= proc(m) local L, j, k;
L:= [seq(m mod j, j=1..m-1)];
k:= 0; j:= 1;
for k from 1 do
do j:= j+1;
if j = m then return k-1 fi;
until L[j] = k
od;
end proc:
F(0):= 0:
F(1):= 1:
map(F, [$0..100]);
CROSSREFS
Sequence in context: A161271 A160975 A305300 * A175851 A049711 A137293
KEYWORD
nonn,hear
AUTHOR
J. M. Bergot and Robert Israel, Dec 06 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 18 18:59 EDT 2024. Contains 374388 sequences. (Running on oeis4.)