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.

Original entry on oeis.org

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

Views

Author

Jason G. Wurtzel, Jul 23 2010

Keywords

Examples

			For n=11, the 11th practical number is 28. As 2+8 = 10 and 1+0 = 1, the digital root is 1.
		

Crossrefs

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

a(n) = A010888(A005153(n)). - Michel Marcus, Nov 12 2015

Extensions

More terms from Robert G. Wilson v, Aug 02 2010