A179657 Digital root of n-th practical number.
1, 2, 4, 6, 8, 3, 7, 9, 2, 6, 1, 3, 5, 9, 4, 6, 3, 9, 2, 6, 1, 3, 9, 6, 8, 3, 7, 9, 6, 1, 5, 9, 4, 3, 9, 2, 6, 5, 9, 6, 3, 7, 9, 6, 5, 9, 3, 7, 9, 2, 6, 1, 3, 9, 4, 8, 3, 9, 6, 9, 4, 8, 3, 9, 2, 6, 1, 9, 6, 3, 7, 9, 2, 6, 5, 9, 6, 3, 7, 9, 6, 1, 9, 4, 8, 9, 2, 6, 3, 5, 9, 4, 3, 9, 2, 6, 9, 8, 7, 9, 6, 1, 3, 5, 9
Offset: 1
Examples
For n=11, the 11th practical number is 28. As 2+8 = 10 and 1+0 = 1, the digital root is 1.
Programs
-
Mathematica
PracticalQ[n_] := Module[{f, p, e, prod = 1, ok = True}, If[n < 1 || (n > 1 && OddQ[n]), False, If[n == 1, True, f = FactorInteger[n]; {p, e} = Transpose[f]; Do[ If[ p[[i]] > 1 + DivisorSigma[1, prod], ok = False; Break[]]; prod = prod*p[[i]]^e[[i]], {i, Length[p]}]; ok]]]; Mod[ Select[ Range@ 500, PracticalQ], 9] /. {0 -> 9} (* Robert G. Wilson v, Aug 02 2010 *)
-
PARI
isok(n) = bittest(n, 0) && return(n==1); my(P=1); n && !for(i=2, #n=factor(n)~, n[1, i]>1+(P*=sigma(n[1, i-1]^n[2, i-1])) && return); for(n=1, 1e3, if(isok(n), print1((n-1)%9+1", "))) \\ Altug Alkan, Nov 12 2015
Formula
Extensions
More terms from Robert G. Wilson v, Aug 02 2010