login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A225559 The number of practical numbers <= n where the practical numbers are A005153. 2
1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 22, 22 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(n) is analogous to A000720.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

Eric W. Weisstein, MathWorld: Practical number

Wikipedia, Practical number

EXAMPLE

a(13)=6 as there are 6 practical numbers <= 13, namely 1, 2, 4, 6, 8 and 12.

MAPLE

isprac:= proc(n) local L, i, P;

  L:= sort(ifactors(n)[2], (a, b) -> a[1]<b[1]);

  if L[1][1] <> 2 then return false fi;

  P:= 2^(L[1][2]+1)-1;

  for i from 2 to nops(L) do

    if L[i][1] > P+1 then return false fi;

    P:= P*(L[i][1]^(L[i][2]+1)-1)/(L[i][1]-1);

  od;

  true

end proc:

isprac(1):= true:

N:= 100: # to get a(1)..a(N)

P:= select(isprac, [1, seq(i, i=2..N, 2)]):

V:= Vector(N):

for n from 2 to nops(P) do V[P[n-1] .. P[n]-1]:= n-1 od:

V[P[-1]..N]:= n:

convert(V, list); # Robert Israel, May 29 2019

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]]]; t={}; n3=1; n4=0; While[n3<100, (If[PracticalQ[n3], n4++]; AppendTo[t, n4]; n3++)]; t (* using T. D. Noe's program A005153 *)

CROSSREFS

Cf. A000720, A005153.

Sequence in context: A228720 A219652 A069924 * A082479 A090616 A186704

Adjacent sequences:  A225556 A225557 A225558 * A225560 A225561 A225562

KEYWORD

nonn

AUTHOR

Frank M Jackson, May 10 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 23 13:38 EDT 2019. Contains 328345 sequences. (Running on oeis4.)