A343021 Positions of records in A343016.
1, 2, 6, 90, 15120, 983010
Offset: 1
Examples
A343016(1) = 0. A343016(2) = 1 is the first value > 0 in A343016. A343016(6) = 5 is the first value > 1. A343016(90) = 6 is the first value > 5. A343016(15120) = 7 is the first value > 6. A343016(983010) = 8 is the first value > 7.
Crossrefs
Cf. A343016.
Programs
-
Maple
R:= 1,2: vmax:= 2: f:= proc(n) local s, t, k; s:= add(t[1]*t[2], t = ifactors(n)[2]); for k from 0 do if not isprime(k*n+s) then return k fi od; end proc: for n from 6 by 6 to 10^6 do v:= f(n); if v > vmax then vmax:= v; R:= R, n; fi od: R;
-
Mathematica
With[{s = Array[Block[{m = 0, k = Plus @@ Times @@@ FactorInteger[#]}, While[PrimeQ[# m + k], m++]; m] &, 10^6]}, Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* Michael De Vlieger, Apr 13 2021 *)
Comments