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!)
A302446 a(n) is the maximum remainder of p*q divided by p+q where p and q are primes with p <= q <= n. 2
0, 3, 3, 7, 7, 11, 11, 11, 11, 11, 11, 23, 23, 23, 23, 23, 23, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 43, 43, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 69, 69, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 91, 91, 91, 91, 91, 91, 103, 103, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 143, 143, 143, 143 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
COMMENTS
Inspired by A302245.
While A302245 is completely predictable, this sequence behaves relatively complex.
Least positive nonsquarefree term is a(139) = 5^2*11.
If a(n) > a(n-1), then n is prime and a(n+1) = a(n). Values of a(n) such that a(n+2) > a(n+1) = a(n) > a(n-1) are 3, 7, 43, 69, 103, 259, 343, 463, 523, ...
Numbers n such that a(n) > a(n-1) are 3, 5, 7, 13, 19, 29, 31, 41, 43, 53, 59, ...
LINKS
FORMULA
If A007917(n) is in A006512, then a(n) = 2*A007917(n) - 3.
EXAMPLE
a(2) = 0 because only option is p = q = 2.
a(3) = 3 because 3^2 mod 6 = 3 is the largest remainder.
MAPLE
Primes:= {}:
A[2]:= 0:
for n from 3 to 200 do
if not isprime(n) then A[n]:= A[n-1]
else
Primes:= Primes union {n};
A[n]:= max(A[n-1], seq(p*n mod (p+n), p=Primes))
fi
od:
seq(A[n], n=2..200); # Robert Israel, Apr 08 2018
MATHEMATICA
a[n_] := Max@ Flatten@ Table[p=Prime[i]; q=Prime[j]; Mod[p q, p + q], {i, PrimePi[n]}, {j, i}]; Array[a, 75, 2]
PROG
(PARI) first(n) = {my(t = 1, u = nextprime(n+1), bet = vector(primepi(u)), res = List(vector(u)), p, q); forprime(p = 2, u, forprime(q = 2, p, r = (p*q) % (p+q); for(i = t, #bet, bet[i] = max(bet[i], r))); t++); t = 1; p = 2; forprime(q = 3, u, for(i = p, q - 1, res[i] = bet[t]); p = q; t++); res[u] = bet[t]; listpop(res, 1); res} \\ David A. Corneth, Apr 08 2018
CROSSREFS
Sequence in context: A063212 A241274 A088147 * A109579 A109580 A168269
KEYWORD
nonn,easy
AUTHOR
Altug Alkan and Andres Cicuttin, Apr 08 2018
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 August 15 03:36 EDT 2024. Contains 375172 sequences. (Running on oeis4.)