|
|
A065515
|
|
Number of prime powers <= n.
|
|
23
|
|
|
1, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 9, 10, 10, 10, 11, 12, 12, 13, 13, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 22, 22, 22, 22, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 26, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29, 29, 30, 30, 31
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Conjecture: a(n) >= pi(A069623(n)) + pi(n) + 1.
Each term m is repeated A057820(m) times. (End)
|
|
REFERENCES
|
F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier-North Holland, 1978, Chapter 4.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 1 + Sum_{k=1..log_2(n)} pi(floor(n^(1/k))). - Chayim Lowen, Aug 05 2015
|
|
EXAMPLE
|
There are 9 prime powers <= 12: 1=2^0, 2, 3, 4=2^2, 5, 7, 8=2^3, 9=3^2 and 11, so a(12) = 9.
|
|
MAPLE
|
N:= 100: # to get a(1) to a(N)
L:= Vector(N):
L[1]:= 1:
p:= 1:
while p < N do
p:= nextprime(p);
for k from 1 to floor(log[p](N)) do
L[p^k] := 1;
od
od:
ListTools:-PartialSums(convert(L, list)); # Robert Israel, May 03 2015
|
|
MATHEMATICA
|
a[n_] := 1 + Count[ Range[2, n], p_ /; Length[ FactorInteger[p]] == 1]; Table[a[n], {n, 1, 73}] (* Jean-François Alcover, Oct 12 2011 *)
Accumulate[Table[If[Length[FactorInteger[n]]==1, 1, 0], {n, 80}]] (* Harvey P. Dale, Aug 06 2016 *)
Accumulate[Table[If[PrimePowerQ[n], 1, 0], {n, 120}]]+1 (* Harvey P. Dale, Sep 29 2016 *)
|
|
PROG
|
(Haskell)
a065515 n = length $ takeWhile (<= n) a000961_list
|
|
CROSSREFS
|
|
|
KEYWORD
|
nice,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|