%I #74 Jun 12 2023 03:11:28
%S 6,21,28,301,325,496,697,1333,1909,2041,2133,3901,8128,10693,16513,
%T 19521,24601,26977,51301,96361,130153,159841,163201,176661,214273,
%U 250321,275833,296341,306181,389593,486877,495529,542413,808861,1005421,1005649,1055833
%N Hyperperfect numbers: x such that x = 1 + k*(sigma(x)-x-1) for some k > 0.
%C k=1 gives the perfect numbers, A000396. For a general k, they are called k-hyperperfect. - _Jud McCranie_, Aug 06 2019
%D R. K. Guy, Unsolved Problems in Number Theory, Sect. B2.
%D J. Roberts, Lure of the Integers, see Integer 28, p. 177.
%H Jud McCranie and Donovan Johnson, <a href="/A034897/b034897.txt">Table of n, a(n) for n = 1..10000</a> (first 2190 terms from Jud McCranie)
%H J. S. McCranie, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL3/mccranie.html">A study of hyperperfect numbers</a>, J. Int. Seqs. Vol. 3 (2000) #P00.1.3.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HyperperfectNumber.html">Hyperperfect Number.</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Hyperperfect_number">Hyperperfect number</a>
%e 21 = 1 + 2*(sigma(21)-21-1), so 21 is 2-hyperperfect. - _Jud McCranie_, Aug 06 2019
%t hpnQ[n_]:=Module[{c=DivisorSigma[1,n]-n-1},c>0&&IntegerQ[(n-1)/c]]; Select[Range[2,809000],hpnQ] (* _Harvey P. Dale_, Jan 17 2012 *)
%o (PARI) forcomposite(n=2, 2*10^6, if(1==Mod(n, sigma(n)-n-1), print1(n", "))) \\ _Hans Loeblich_, May 07 2019
%o (Python)
%o from itertools import count, islice
%o from sympy import isprime, divisor_sigma
%o def A034897_gen(): # generator of terms
%o return (n for n in count(2) if not isprime(n) and (n-1) % (divisor_sigma(n)-n-1) == 0)
%o A034897_list = list(islice(A034897_gen(),10)) # _Chai Wah Wu_, Feb 18 2022
%Y Cf. A034898, A007592, A019279.
%K nonn,nice
%O 1,1
%A _Jud McCranie_
%E More complete name from _Jud McCranie_, Aug 06 2019