cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A361102 1 together with numbers having at least two distinct prime factors.

This page as a plain text file.
%I A361102 #31 Aug 31 2024 12:29:26
%S A361102 1,6,10,12,14,15,18,20,21,22,24,26,28,30,33,34,35,36,38,39,40,42,44,
%T A361102 45,46,48,50,51,52,54,55,56,57,58,60,62,63,65,66,68,69,70,72,74,75,76,
%U A361102 77,78,80,82,84,85,86,87,88,90,91,92,93,94,95,96,98,99,100,102,104,105,106,108,110,111,112
%N A361102 1 together with numbers having at least two distinct prime factors.
%C A361102 This is the union of 1 and A024619. It is the sequence C used in the definition of A360519. Since C is central to the analysis of A360519 it deserves its own entry.
%C A361102 This has the same relationship to A024619 as A000469 does to A120944 for squarefree numbers.
%H A361102 Michael De Vlieger, <a href="/A361102/b361102.txt">Table of n, a(n) for n = 1..10000</a>
%F A361102 From _Peter Luschny_ and _Michael De Vlieger_, May 17 2023: (Start)
%F A361102 The sequence is the complement of the prime powers in the positive integers, a = A000027 \ A246655.
%F A361102 k is in this sequence <=> k divides lcm(1, 2, ..., k-1). (End)
%F A361102 This sequence is {1} U { A120944 U A126706 } = {1} U A024619. - _Michael De Vlieger_, May 17 2023
%p A361102 isa := n -> is(irem(ilcm(seq(1..n-1)), n) = 0):
%p A361102 aList := upto -> select(isa, [seq(1..upto)]):
%p A361102 aList(112); # _Peter Luschny_, May 17 2023
%t A361102 Select[Range[120], Not@*PrimePowerQ] (* _Michael De Vlieger_, May 17 2023 *)
%o A361102 (SageMath)
%o A361102 def A361102List(upto: int) -> list[int]:
%o A361102     return sorted(Set(1..upto).difference(prime_powers(upto)))
%o A361102 print(A361102List(112))  # _Peter Luschny_, May 17 2023
%o A361102 (Python)
%o A361102 from sympy import primepi, integer_nthroot
%o A361102 def A361102(n):
%o A361102     def f(x): return int(n+sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
%o A361102     def bisection(f,kmin=0,kmax=1):
%o A361102         while f(kmax) > kmax: kmax <<= 1
%o A361102         while kmax-kmin > 1:
%o A361102             kmid = kmax+kmin>>1
%o A361102             if f(kmid) <= kmid:
%o A361102                 kmax = kmid
%o A361102             else:
%o A361102                 kmin = kmid
%o A361102         return kmax
%o A361102     return bisection(f) # _Chai Wah Wu_, Aug 31 2024
%Y A361102 Cf. A000469, A024619, A120944, A126706, A246655, A360519.
%K A361102 nonn
%O A361102 1,2
%A A361102 _Scott R. Shannon_ and _N. J. A. Sloane_, Mar 02 2023
%E A361102 Offset set to 1 by _Peter Luschny_, May 17 2023