Displaying 1-10 of 46 results found.
Primes (in order) occurring in A053810.
+20
4
2, 2, 3, 5, 3, 2, 7, 11, 5, 2, 13, 3, 17, 7, 19, 23, 29, 31, 11, 37, 41, 43, 2, 3, 13, 47, 53, 5, 59, 61, 67, 17, 71, 73, 79, 19, 83, 89, 2, 97, 101, 103, 107, 109, 23, 113, 127, 7, 131, 137, 139, 149, 151, 29, 157, 163, 167, 31, 173, 179, 181, 191, 193, 197, 199, 211, 223
PROG
(PARI) LIM = prime(80)^2; v = vector(400); count = 0; forprime (p = 2, prime(80), x = 2; while (p^x <= LIM, count++; v[count] = p^x; x = nextprime(x + 1))); v = vecsort(vector(count, i, v[i])); A = vector(count); for (i = 1, count, f = factor(v[i]); A[i] = f[1, 1]); A \\ David Wasserman, Feb 17 2006
(Python)
from sympy import primepi, integer_nthroot, primerange, primefactors
def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))
kmin, kmax = 1, 2
while f(kmax) >= kmax:
kmax <<= 1
while True:
kmid = kmax+kmin>>1
if f(kmid) < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
return primefactors(kmax)[0] # Chai Wah Wu, Aug 13 2024
2, 3, 2, 2, 3, 5, 2, 2, 3, 7, 2, 5, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 11, 7, 3, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 13, 2, 2, 2, 2, 2, 3, 2, 2, 5, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 7, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 17, 2, 2, 2, 2, 3, 2, 2, 2
PROG
(PARI) LIM = prime(80)^2; v = vector(400); count = 0; forprime (p = 2, prime(80), x = 2; while (p^x <= LIM, count++; v[count] = p^x; x = nextprime(x + 1))); v = vecsort(vector(count, i, v[i])); vector(count, i, bigomega(v[i])) \\ David Wasserman, Feb 17 2006
(Python)
from sympy import primepi, integer_nthroot, primerange, factorint
def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))
kmin, kmax = 1, 2
while f(kmax) >= kmax:
kmax <<= 1
while True:
kmid = kmax+kmin>>1
if f(kmid) < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
return list(factorint(kmax).values())[0] # Chai Wah Wu, Aug 13 2024
The number of prime powers of prime numbers ( A053810) that divide n.
+20
4
0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, 2, 1, 0, 2, 1, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 2, 1, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 1, 0, 0, 1, 3, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 1, 0, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0
COMMENTS
a(n) depends only on the prime signature of n.
Every nonnegative number appears in the sequence of record values. k >= 1 first occurs at n = 2^prime(k) ( A034785).
FORMULA
a(n) = 0 if and only if n is squarefree ( A005117).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} P(p) = 0.67167522222173297323..., where P(s) is the prime zeta function.
MATHEMATICA
f[p_, e_] := PrimePi[e]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, primepi(f[i, 2])); }
Take the primes raised to prime exponents, arranged in numerical order ( A053810). If A053810(n) = r(n)^q(n), where r(n) and q(n) are primes, then a(n) = q(n)^r(n).
+20
2
4, 9, 8, 32, 27, 25, 128, 2048, 243, 49, 8192, 125, 131072, 2187, 524288, 8388608, 536870912, 2147483648, 177147, 137438953472, 2199023255552, 8796093022208, 121, 343, 1594323, 140737488355328, 9007199254740992, 3125, 576460752303423488, 2305843009213693952, 147573952589676412928
PROG
(PARI) lista(nn) = for(k=1, nn, if(isprime(isprimepower(k, &p)), print1(bigomega(k)^p, ", "))); \\ Jinyuan Wang, Feb 25 2020
(Python)
from math import prod
from sympy import primepi, integer_nthroot, primerange, factorint
def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))
kmin, kmax = 1, 2
while f(kmax) >= kmax:
kmax <<= 1
while True:
kmid = kmax+kmin>>1
if f(kmid) < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
return prod(e**p for p, e in factorint(kmax).items()) # Chai Wah Wu, Aug 13 2024
1, 3, 2, 6, 5, 4, 10, 23, 12, 7, 39, 9, 97, 24, 164, 484, 2759, 5044, 109, 32334, 114605, 216960, 8, 14, 252, 785135, 5503557, 28, 39222428, 75703838, 548300521, 1496, 2063337476, 4008153424, 29523940595, 3858, 112174606866, 834662735468, 11, 12216544412251
COMMENTS
This sequence is a permutation of the positive integers. It is its own inverse permutation.
EXAMPLE
The primes raised to prime exponents form the sequence, when the terms are arranged in numerical order, 4,8,9,25,27,32,49,121,125,128,...(sequence A053810). The 10th term is 128, which is 2^7. So the 10th term of sequence A145521 is 7^2 = 49. 49 is the 7th term of A053810. So a(10) = 7 and a(7) = 10.
PROG
(PARI) lista(nn) = {my(c, m); for(k=1, nn, if(isprime(isprimepower(k, &p)), c=0; m=bigomega(k)^p; forprime(q=2, sqrtint(m), c+=primepi(logint(m, q))); print1(c, ", "))); } \\ Jinyuan Wang, Feb 25 2020
(Python)
from itertools import count
from sympy import integer_nthroot, isprime, primepi
total = 0
for p in count(2):
if isprime(p): total += primepi(integer_nthroot( A145521(n), p)[0])
(Python)
from math import prod
from sympy import primepi, integer_nthroot, primerange, factorint
def f(x): return int(n+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
a = prod(e**p for p, e in factorint(m).items())
return sum(primepi(integer_nthroot(a, p)[0]) for p in primerange(a.bit_length())) # Chai Wah Wu, Aug 10 2024
Differences between consecutive prime powers of primes (see A053810).
+20
1
4, 1, 16, 2, 5, 17, 72, 4, 3, 41, 74, 46, 54, 18, 168, 312, 120, 370, 38, 312, 168, 199, 139, 10, 12, 600, 316, 356, 240, 768, 424, 128, 288, 912, 618, 30, 1032, 271, 1217, 792, 408, 840, 432, 286, 602, 3360, 678, 354, 1608, 552, 2880, 600, 1588, 260, 1920, 1320, 1902
EXAMPLE
11^2=121 and 5^3=125 are members with index 8 and 9 in A053810. So a(8)=125-121=4.
PROG
(Python)
from sympy import primepi, integer_nthroot, primerange
def f(x): return int(n+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
return -(a:=bisection(f, n, n))+bisection(lambda x:f(x)+1, a, a) # Chai Wah Wu, Sep 12 2024
Smallest prime p such that p - 2^e is also prime power ( A053810) in exactly n cases for nonnegative integers e.
+20
0
149, 2, 5, 11, 83, 829, 3331, 32941, 176417, 854929, 2233531, 12699571, 47924959, 763597201
COMMENTS
0: 149, 331, 373, 509, 701, 757, 809, 877, 907, 997, 1019, ...;
1: 2, 3, 127, 163, 179, 191, 193, 223, 239, 251, 269, 311, ...;
2: 5, 7, 23, 37, 47, 53, 59, 67, 71, 79, 97, 101, 103, ...;
3: 11, 13, 17, 19, 29, 31, 41, 43, 61, 73, 89, 131, 137, ...;
4: 83, 113, 139, 181, 199, 293, 353, 571, 593, 601, 619, ...;
5: 829, 1217, 1487, 2131, 2341, 2551, 2971, 4051, 4261, ...;
6: 3331, 12109, 14551, 17393, 18233, 22279, 22307, 22741, ...;
7: 32941, 34369, 44029, 49433, 53633, 67189, 95717, 99833, ...;
8: 176417, 304771, 314723, 314779, 349667, 414707, 451937, ...;
9: 854929, 1297651, 1328927, 1784723, 2164433, 2488909, ...;
10: 2233531, 6026089, 7475389, 7623229, 9644911, 10019551, ...;
11: 12699571, 18464123, 52849879, 78127339, 79303579, 84397463, ...;
12: 47924959, 153309649, 204797059, 248685923, 273865219, ...;
13: 763597201, ...;
...
MATHEMATICA
f[p_] := Length@ Table[q = p - 2^exp; If[ PrimeNu@ q == 1, {q}, Sequence @@ {}], {exp, 0, Floor@ Log2@ p}]; t = Table[0, {20}]; p = 2; While[p < 1000000000, a = f[p] +1; If[a < 101 && t[[a]] == 0, t[[a]] == p; Print[{a -1, p}]]; p = NextPrime@ p]; t
Number of ways to fill a matrix with the parts of the integer partition with Heinz number n.
+10
17
1, 1, 1, 2, 1, 4, 1, 2, 2, 4, 1, 6, 1, 4, 4, 3, 1, 6, 1, 6, 4, 4, 1, 12, 2, 4, 2, 6, 1, 12, 1, 2, 4, 4, 4, 18, 1, 4, 4, 12, 1, 12, 1, 6, 6, 4, 1, 10, 2, 6, 4, 6, 1, 12, 4, 12, 4, 4, 1, 36, 1, 4, 6, 4, 4, 12, 1, 6, 4, 12, 1, 20, 1, 4, 6, 6, 4, 12, 1, 10, 3, 4
COMMENTS
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
EXAMPLE
The a(24) = 12 matrices whose entries are (2,1,1,1):
[1 1 1 2] [1 1 2 1] [1 2 1 1] [2 1 1 1]
.
[1 1] [1 1] [1 2] [2 1]
[1 2] [2 1] [1 1] [1 1]
.
[1] [1] [1] [2]
[1] [1] [2] [1]
[1] [2] [1] [1]
[2] [1] [1] [1]
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
facs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[facs[n/d], Min@@#>=d&]], {d, Rest[Divisors[n]]}]];
ptnmats[n_]:=Union@@Permutations/@Select[Union@@(Tuples[Permutations/@#]&/@Map[primeMS, facs[n], {2}]), SameQ@@Length/@#&];
Array[Length[ptnmats[#]]&, 100]
CROSSREFS
Positions of 1's are one and prime numbers A008578.
Positions of 2's are primes to prime powers A053810.
Sum of non-exponential divisors of n.
+10
13
1, 1, 1, 1, 1, 6, 1, 5, 1, 8, 1, 10, 1, 10, 9, 9, 1, 15, 1, 12, 11, 14, 1, 30, 1, 16, 10, 14, 1, 42, 1, 29, 15, 20, 13, 19, 1, 22, 17, 40, 1, 54, 1, 18, 18, 26, 1, 58, 1, 33, 21, 20, 1, 60, 17, 50, 23, 32, 1, 78, 1, 34, 20, 49, 19, 78, 1, 24, 27, 74, 1, 75, 1, 40, 34, 26, 19, 90, 1, 76, 28
COMMENTS
The non-exponential divisors d|n of a number n = p(i)^e(i) are divisors d not of the form p(i)^s(i), s(i)|e(i) for all i.
FORMULA
a(1) = 1, a(p) = 1, a(p*q) = 1 + p + q, a(p*q*...*z) = (p + 1)*(q + 1)*...*(z + 1) - p*q*...*z, for p, q,..,z = primes ( A000040), p*q = product of two distinct primes ( A006881), p*q*...*z = product of k (k > 0) distinct primes ( A120944).
a(p^k) = (p^(k+1)-1)/(p-1)- Sum_{d|k} p^d for p = primes ( A000040), p^k = prime powers A000961(n>1), k = natural numbers ( A000027)>
a(p^q) = 1+(p^1-p^1)+p^2+p^3+...+p^(q-1), for p, q = primes ( A000040), p^q = prime powers of primes ( A053810).
EXAMPLE
a(8) = A000203(8) - A051377(8) = 15 - 10 = 5. a(8) = a(2^3) = (2^4-1)/(2-1) - (2^1+2^3) = 5.
MAPLE
lpowp := proc(n, p) local e; for e from 0 do if n mod p^(e+1) <> 0 then RETURN(e) ; fi; od: end:
expdvs := proc(n) local a, d, nfcts, b, f, iseDiv ; a := {} ; nfcts := ifactors(n)[2] ; for d in ( numtheory[divisors](n) minus {1} ) do iseDiv := true; for f in nfcts do b := lpowp(d, op(1, f) ) ; if b = 0 or op(2, f) mod b <> 0 then iseDiv := false; fi; od: if iseDiv then a := a union {d} ; fi; od: a ; end proc:
A051377 := proc(n) local k ; add( k, k = expdvs(n)) ; end: A160135 := proc(n) if n = 1 then 1; else numtheory[sigma][1](n)- A051377(n) ; fi; end: seq( A160135(n), n=1..120) ; # R. J. Mathar, May 08 2009
MATHEMATICA
esigma[n_] := Times @@ (Sum[First[#]^d, {d, Divisors[Last[#]]}] &) /@ FactorInteger[n]; a[1] = 1; a[n_] := DivisorSigma[1, n] - esigma[n]; Array[a, 100] (* Amiram Eldar, Oct 26 2021 after Jean-François Alcover at A051377 *)
PROG
(PARI)
A051377(n) = { my(f=factor(n)); prod(i=1, #f[, 1], sumdiv(f[i, 2], d, f[i, 1]^d)); }; \\ From A051377
Squares and cubes of primes.
+10
12
4, 8, 9, 25, 27, 49, 121, 125, 169, 289, 343, 361, 529, 841, 961, 1331, 1369, 1681, 1849, 2197, 2209, 2809, 3481, 3721, 4489, 4913, 5041, 5329, 6241, 6859, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12167, 12769, 16129, 17161, 18769, 19321, 22201
COMMENTS
Primitive elements for powerful numbers; every powerful is product of these numbers. The representation is not necessarily unique.
FORMULA
Sum_{n>=1} 1/a(n) = P(2) + P(3) = 0.6270100593..., where P is the prime zeta function. - Amiram Eldar, Dec 21 2020
MATHEMATICA
With[{nn=50}, Take[Union[Flatten[Table[{n^2, n^3}, {n, Prime[Range[ nn]]}]]], nn]] (* Harvey P. Dale, Feb 26 2015 *)
PROG
(PARI) for(n=1, 40000, fm=factor(n); if(matsize(fm)[1]==1&(fm[1, 2]==2||fm[1, 2]==3), print1(n", ")))
(Python)
from math import isqrt
from sympy import primepi, integer_nthroot
def f(x): return n+x-primepi(isqrt(x))-primepi(integer_nthroot(x, 3)[0])
m, k = n, f(n)
while m != k:
m, k = k, f(k)
Search completed in 0.020 seconds
|