A002975 Primitive weird numbers: weird numbers with no proper weird divisors.
70, 836, 4030, 5830, 7192, 7912, 9272, 10792, 17272, 45356, 73616, 83312, 91388, 113072, 243892, 254012, 338572, 343876, 388076, 519712, 539744, 555616, 682592, 786208, 1188256, 1229152, 1713592, 1901728, 2081824, 2189024, 3963968, 4128448
Offset: 1
Examples
10430 = A006037(8) is weird but not primitive weird because it has the proper weird divisor 70 = A006037(1).
References
- R. K. Guy, Unsolved Problems in Number Theory, B2.
- R. Honsberger, Mathematical Gems, M.A.A., 1973, p. 113.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..1161 (terms a(58)-a(160) from Donovan Johnson). [Term a(1159) inserted and b-file reformatted by _Georg Fischer_, Jan 16 2019]
- Stan Benkoski, Problem E2308, Amer. Math. Monthly, 79 (1972) 774.
- Gianluca Amato, Maximilian F. Hasler, Giuseppe Melfi and Maurizio Parton, Primitive weird numbers having more than three distinct prime factors, Riv. Mat. Univ. Parma, Vol. 7, No. 1 (2016) 153-163.
- Gianluca Amato, Maximilian F. Hasler, Giuseppe Melfi and Maurizio Parton, Primitive abundant and weird numbers with many prime factors, Journal of Number Theory vol. 201 (2019) pp. 436-459. DOI: 10.1016/j.jnt.2019.02.027. (Preprint: arXiv:1802.07178.)
- S. J. Benkoski and P. Erdős, On weird and pseudoperfect numbers, Math. Comp., 28 (1974), pp. 617-623. Alternate link; 1975 corrigendum.
- R. K. Guy, Letter to N. J. A. Sloane with attachment, Jun. 1991
- Douglas E. Iannucci, On primitive weird numbers of the form 2^k*p*q, arXiv:1504.02761 [math.NT], 2015.
- G. Melfi, On the conditional infiniteness of primitive weird numbers, Journal of Number Theory, Volume 147, February 2015, Pages 508-514.
- Robert G. Wilson v, Table of n, a(n) along with its abundance and their factorizations for n = 1..1161
Crossrefs
Programs
-
Mathematica
(* first do *) << Combinatorica` (* then *) fQ[n_] := Block[{d = Most@ Divisors@ n, l = 2^(DivisorSigma[0, n] - 1), i = 1}, i = 1; While[i < l && Plus @@ NthSubset[i, d] != n, i++ ]; i == l]; lst = {}; Do[m = n; If[ Mod[n, 6] != 0 && DivisorSigma[1, n] > 2 n && Union[ Mod[ n, Join[lst, {n + 1}]]][[1]] != 0 && fQ@n, AppendTo[lst, n]; Print@n], {n, 2, 42000000, 2}] (* Robert G. Wilson v, Aug 04 2009 *) (* Input: Range of even numbers --- Output: Primitive weird numbers *) Block[{$RecursionLimit = Infinity}, subOfSum[ss_, kk_, rr_] := Module[{s = ss, k = kk, r = rr}, If[s + w[[k]] >= mm && s + w[[k]] <= m, t = False; Goto[done] (* Found *), If[s + w[[k]] + w[[k + 1]] <= m, subOfSum[s + w[[k]], k + 1, r - w[[k]]]]; If[s + r - w[[k]] >= m && s + w[[k + 1]] <= m, subOfSum[s, k + 1, r - w[[k]] ]]]; t]; (* end subOfSum *) greedyQ[ab_] := Module[{abn = ab, v, sum, s, j, jj, k}, tt = False; jj = Length[w]; (* start search *) Do[s = r; sum = 0; Do[v = w[[j]]; sum = sum + v; If[sum > abn, sum = sum - v; Goto[nxt]]; If[sum == abn, tt = True; Goto[doneG]]; s = s - v; Label[nxt], {j, jj, 1, -1}]; jj = jj - 1, {k, 1, jj - 1}]; Label[doneG]; (* True means found, False not found *) tt]; (* end greedyQ *) cnt = 0; Do[ If[ Mod[n, 3] == 0, Goto[agn]]; r = DivisorSigma[1, n]; m = r - 2*n; If[m > 0, fi = FactorInteger[n]; largestP = fi[[Length[fi]]][[1]]; nn = n/largestP; If[m > 2*nn || Length[fi] < 3, Goto[agn]]; If[DivisorSigma[1, nn] > 2*nn, Goto[agn]]; t = True; r = r - n; ww = Divisors[n]; lenW = Length[ww]; Do[ If[ ww[[i]] <= m, w = Drop[ww, i - lenW]; Break[], r = r - ww[[i]]], {i, lenW - 1, 1, -1}]; If[r >= m, If[ greedyQ[m], t = False, (* Powers of 2 dropped *) exp2 = fi[[1]][[2]]; sig2 = 2^(exp2 + 1) - 1; mm = m - sig2; lenW = Length[w]; ww = {}; If[exp2 > 1, Do[ Do[ If[ w[[i]] == 2^ii, ww = AppendTo[ww, w[[i]]]], {i, 1, lenW}], {ii, 0, exp2}]; w = Complement[w, ww] (* end T if *), w = Drop[w, 2]]; (* end Pwr2 *) t = subOfSum[0, 1, r]]]; Label[done]; If[t, Print[++cnt, " ", n, " ", t]]]; Label[agn], {n, 2, 10000000, 2}]] (* from Brent Baughn via http://mathematica.stackexchange.com/questions/73301/calculating-weird-numbers, Robert G. Wilson v, Nov 21 2015 *)
-
PARI
is_A002975(n)=is_A006037(n)&&!fordiv(n,d,!bittest(d,0)&&d
A006037(d)&&return) \\ M. F. Hasler, Jan 07 2014
Extensions
More terms from Jud McCranie, Oct 21 2001
One more term from Robert G. Wilson v, Aug 04 2009
a(1)-a(123) double-checked by M. F. Hasler, Jan 07 2014
Edited by M. F. Hasler, Jul 12 2016
Comments