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.

A179657 Digital root of n-th practical number.

This page as a plain text file.
%I A179657 #14 Nov 12 2015 05:20:40
%S A179657 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,
%T A179657 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,
%U A179657 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
%N A179657 Digital root of n-th practical number.
%F A179657 a(n) = A010888(A005153(n)). - _Michel Marcus_, Nov 12 2015
%e A179657 For n=11, the 11th practical number is 28. As 2+8 = 10 and 1+0 = 1, the digital root is 1.
%t A179657 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 *)
%o A179657 (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);
%o A179657 for(n=1, 1e3, if(isok(n), print1((n-1)%9+1", "))) \\ _Altug Alkan_, Nov 12 2015
%Y A179657 Cf. A005153, A010888.
%K A179657 nonn,base
%O A179657 1,2
%A A179657 _Jason G. Wurtzel_, Jul 23 2010
%E A179657 More terms from _Robert G. Wilson v_, Aug 02 2010