login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Second smallest prime factor of numbers m that are both squarefree and composite.
1

%I #14 Oct 07 2024 00:43:31

%S 3,5,7,5,7,11,13,3,11,17,7,19,13,3,23,17,11,19,29,31,13,3,23,5,37,11,

%T 3,41,17,43,29,13,31,47,19,3,5,53,5,37,3,23,59,17,61,41,43,5,19,67,3,

%U 47,71,13,29,73,7,31,79,53,23,5,83,5,3,59,89,7,61,37,3

%N Second smallest prime factor of numbers m that are both squarefree and composite.

%H Michael De Vlieger, <a href="/A376833/b376833.txt">Table of n, a(n) for n = 1..10000</a>

%H Michael De Vlieger, <a href="/A376833/a376833.png">Log log scatterplot of a(n)</a>, n = 1..2^20.

%F a(n) = A119288(A120944(n)).

%F For even squarefree semiprime A120944(n) = 2*p with odd prime p, a(n) = p sets a record in this sequence.

%e Let b(n) = A120944(n).

%e a(1) = 3 since b(1) = 6, and 3 is the second smallest prime factor.

%e a(2) = 5 since b(2) = 10, and 5 is the second smallest prime factor.

%e Table showing select values of a(n):

%e n b(n) a(n)

%e -----------------------

%e 1 6 = 2*3 3

%e 2 10 = 2*5 5

%e 3 14 = 2*7 7

%e 4 15 = 3*5 5

%e 5 21 = 3*7 7

%e 6 22 = 2*11 11

%e 7 26 = 2*13 13

%e 8 30 = 2*3*5 3

%e 14 42 = 2*3*7 3

%e 22 66 = 2*3*11 3

%e 24 70 = 2*5*7 5

%e 82 210 = 2*3*5*7 3

%t Map[FactorInteger[#][[2, 1]] &, Select[Range[250], And[SquareFreeQ[#], CompositeQ[#]] &]]

%o (Python)

%o from math import isqrt

%o from sympy import primepi, mobius, primefactors

%o def A376833(n):

%o def f(x): return n+1+primepi(x)+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))

%o m, k = n+1, f(n+1)

%o while m != k:

%o m, k = k, f(k)

%o return primefactors(m)[1] # _Chai Wah Wu_, Oct 06 2024

%Y Cf. A119288, A120944.

%K nonn,easy

%O 1,1

%A _Michael De Vlieger_, Oct 05 2024