login
Primes together with 1 and 4.
32

%I #83 Oct 17 2024 14:46:25

%S 1,2,3,4,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,

%T 89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,

%U 179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269

%N Primes together with 1 and 4.

%C Also the numbers which are incrementally largest values of A002034. - validated by _Franklin T. Adams-Watters_, Jul 13 2012

%C Solutions to A000005(x) + A000010(x) - x - 1 = 0. - _Labos Elemer_, Aug 23 2001

%C Also numbers m such that m, phi(m) and tau(m) form an integer triangle, where phi=A000010 is the totient and tau=A000005 the number of divisors (see also A084820). - _Reinhard Zumkeller_, Jun 04 2003

%C Terms > 1 are n such that n does not divide (n-1)!. - _Benoit Cloitre_, Nov 12 2003

%C Terms > 1 are the sum of their prime factors; 4 (= 2+2) is the only such composite number. - Stuart Orford (sjorford(AT)yahoo.co.uk), Aug 04 2005

%C From _Jonathan Vos Post_, Aug 23 2010, _Robert G. Wilson v_, Aug 25 2010, proof by _D. S. McNeil_, Aug 29 2010: (Start)

%C Also the numbers n which divide A001414(n), or equivalently divide A075254(n). Proof:

%C Theorem: for a multiset of m >= 2 integers a_i, each a_i >= 2, Product_{i=1..m} a_i >= Sum_{i=1..m} a_i, with equality only at (a_1,a_2) = (2,2).

%C Lemma: For integers x,y >= 2, if x > 2 or y > 2, x*y > x + y. This follows from distributing (x-1)*(y-1) > 1.

%C [Proof of the theorem by induction on m:

%C first consider m=2. We have equality at (2,2) and for any product(a_i) > 4 there is some a_i > 2, so the lemma gives a_1*a_2 > a_1+a_2.

%C Then the induction m->m+1: Product_{i=1..m+1} a_i = a_(m+1)*Product_{i=1..m} a_i >= a_(m+1) * Sum_{i=1..m} a_i.

%C Since a_(m+1) >= 2 and the sum >= 4, the lemma applies, and we find a_(m+1) * Sum+{i=1..m} a_i > a_(m+1) + Sum_{i=1..m} a_i = Sum_{i=1..m+1} a_i and thus Product_{i=1..m+1} a_i > Sum_{i=1..m+1} a_i, QED.]

%C For composite n > 4, applying the theorem to the multiset of prime factors with multiplicity yields n > sopfr(n), so there are no composite numbers greater than 4 such that they divide sopfr(n).

%C (End)

%C Numbers k such that the k-th Fibonacci number is relatively prime to all smaller Fibonacci numbers. - _Charles R Greathouse IV_, Jul 13 2012

%C Numbers k such that (-1)^k*floor(d(k)*(-1)^k/2) = 1, where d(k) is the number of divisors of k. - _Wesley Ivan Hurt_, Oct 11 2013

%C Also, union of odd primes (A065091) and the divisors of 4. Also, union of A008578 and 4. - _Omar E. Pol_, Nov 04 2013

%C Numbers k such that sigma(k!) is divisible by sigma((k-1)!). - _Altug Alkan_, Jul 18 2016

%H J. Sondow and E. W. Weisstein, <a href="http://mathworld.wolfram.com/SmarandacheFunction.html">MathWorld: Smarandache Function</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SumofPrimeFactors.html">Sum of Prime Factors</a>

%F A141295(a(n)) = a(n). - _Reinhard Zumkeller_, Jun 23 2008

%F A018194(a(n)) = 1. - _Reinhard Zumkeller_, Mar 09 2012

%F A240471(a(n)) = 1. - _Reinhard Zumkeller_, Apr 06 2014

%p A046022:=n-> `if`((-1)^n*floor(numtheory[tau](n)*(-1)^n/2) = 1, n, NULL); seq(A046022(j), j=1..260); # _Wesley Ivan Hurt_, Oct 11 2013

%t max = 0; a = {}; Do[m = FactorInteger[n]; w = Sum[m[[k]][[1]]*m[[k]][[2]], {k, 1, Length[m]}]; If[w > max, AppendTo[a, w]; max = w], {n, 1, 1000}]; a (* _Artur Jasinski_, Apr 06 2008 *)

%o (Haskell)

%o a046022 n = a046022_list !! (n-1)

%o a046022_list = [1..4] ++ drop 2 a000040_list

%o -- _Reinhard Zumkeller_, Apr 06 2014

%o (PARI) a(n)=if(n<6,n,prime(n-2)) \\ _Charles R Greathouse IV_, Apr 28 2015

%o (Python)

%o from sympy import prime

%o def A046022(n): return prime(n-2) if n>4 else n # _Chai Wah Wu_, Oct 17 2024

%Y Cf. A002034, A046021, A001751, A178156, A174460, A000040.

%K nonn,easy

%O 1,2

%A _Eric W. Weisstein_

%E Better description from _Frank Ellermann_, Jun 15 2001