login
a(n) = {smallest prime not dividing n} times {greatest primorial number which divides n} = A053669(n) * A053589(n).
6

%I #14 Aug 26 2016 22:57:04

%S 2,6,2,6,2,30,2,6,2,6,2,30,2,6,2,6,2,30,2,6,2,6,2,30,2,6,2,6,2,210,2,

%T 6,2,6,2,30,2,6,2,6,2,30,2,6,2,6,2,30,2,6,2,6,2,30,2,6,2,6,2,210,2,6,

%U 2,6,2,30,2,6,2,6,2,30,2,6,2,6,2,30,2,6,2,6,2,30,2,6,2,6,2,210,2,6,2,6,2,30,2,6,2,6,2,30,2,6,2,6,2,30,2,6

%N a(n) = {smallest prime not dividing n} times {greatest primorial number which divides n} = A053669(n) * A053589(n).

%C a(n) with n odd must = 2 because 1 is the only odd primorial, thereby the only primorial dividing odd n, and 2 is the smallest prime not dividing odd n. - _Michael De Vlieger_, Aug 25 2016

%H Antti Karttunen, <a href="/A276152/b276152.txt">Table of n, a(n) for n = 1..2310</a>

%F a(n) = A053589(n) * A053669(n).

%F a(n) = A002110(A257993(n)).

%e a(6) = 30 because the smallest nondivisor prime 6 = 5 and the smallest primorial dividing 6 is 6 itself. 5 * 6 = 30.

%t Table[If[n == 1, 2, Prime@If[! MemberQ[#, 0], Length@ # + 1, Position[#, 0][[1, 1]]] (Times @@ Prime@ Flatten@ Position[TakeWhile[#, # > 0 &], 1]) &@ Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@# -> 1 &, f]]@ FactorInteger@ n], {n, 120}] (* or *)

%t Table[If[OddQ@ n, 2, Function[p, Prime[p + 1] Product[Prime@ k, {k, #[[p]]}]][LengthWhile[Differences@ #, # == 1 &] + 1] &@ PrimePi[FactorInteger[n][[All, 1]]]], {n, 120}] (* _Michael De Vlieger_, Aug 25 2016 *)

%o (Scheme, two versions)

%o (define (A276152 n) (* (A053669 n) (A053589 n)))

%o (define (A276152 n) (A002110 (A257993 n)))

%Y Cf. A002110, A053589, A053669, A257993.

%Y Cf. also A276154.

%K nonn

%O 1,1

%A _Antti Karttunen_, Aug 24 2016