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!)
A230374 The numbers n such that during dividing n by all positive integers not exceeding n the remainder 0 occurs most often. 3
1, 2, 3, 4, 6, 8, 10, 12, 15, 16, 18, 20, 24, 28, 30, 36, 40, 42, 45, 48, 54, 56, 60, 66, 70, 72, 78, 80, 84, 90, 96, 100, 102, 104, 105, 108, 112, 120, 126, 132, 138, 140, 144, 150, 156, 160, 168, 176, 180, 192, 198, 200, 204, 208, 210, 216, 224, 228, 234, 240, 252 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

A natural generalization of highly composite numbers (A002182), which is a subsequence of this sequence.

LINKS

Ivan Neretin, Table of n, a(n) for n = 1..1000

EXAMPLE

8 is in the sequence because remainder 0 occurs 4 times during division 8 by 1, 2, 3, 4, 5, 6, 7, 8, that is more than other remainders.

9 is not in the sequence because both remainders 0 and 1 occur 3 times during division 9 by 1, 2, 3, 4, 5, 6, 7, 8, 9.

MAPLE

rem0:=proc(n) local r, n1, i, mx, f, R;

n1:=`if`(n mod 2 = 0, n/2-1, (n-1)/2);

R:=Array(0..n1, fill=1):if n mod 2 = 0 then R[0]:=2 fi:

for i to n1 do r:=n mod i: R[r]:=R[r]+1 od:

mx:=R[0]:f:=true:

for i to n1 do

if R[i]>= mx then f:=false:break fi od:

f; end;

for n do if maxrem(n) then print(n) fi od:

MATHEMATICA

Select[Range[256], (r = (Transpose@Tally@Mod[#, Range@#])[[2]])[[1]] > Max@Rest@r &] (* Ivan Neretin, Nov 13 2016 *)

zmoQ[n_] := Module[{r = Sort[Tally[Mod[n, Range[n]]]], mx}, mx = Select[r, #[[2]] == Max[r[[All, 2]]] &]; Length[mx] == 1 && mx[[1, 1]] == 0]; Select[ Range[300], zmoQ] (* Harvey P. Dale, Jul 02 2019 *)

PROG

(PARI) is(n)=v=vector(n+1); for(d=1, n, t=(n%d)+1; v[t]=v[t]+1); nd=v[1]; for(i=2, n, if(v[i]>=nd, return(0))); 1 \\ Ralf Stephan, Oct 21 2013

CROSSREFS

Cf. A002182, A230399.

Sequence in context: A078769 A064375 A037229 * A007183 A067783 A062418

Adjacent sequences:  A230371 A230372 A230373 * A230375 A230376 A230377

KEYWORD

nonn

AUTHOR

Vladimir Letsko, Oct 17 2013

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 April 6 11:51 EDT 2020. Contains 333273 sequences. (Running on oeis4.)