A077270 Duplicate of A076048.
1, 4, 11, 26, 52, 109, 237, 556, 1405, 3690, 10085, 28157, 80071, 230568, 670122
Offset: 0
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.
a025475 n = a025475_list !! (n-1) a025475_list = filter ((== 0) . a010051) a000961_list -- Reinhard Zumkeller, Jun 22 2011
isA025475 := proc(n) if n < 1 then false; elif n = 1 then true; elif isprime(n) then false; elif nops(numtheory[factorset](n)) = 1 then true; else false; end if; end proc: A025475 := proc(n) option remember; local a; if n = 1 then 1; else for a from procname(n-1)+1 do if isA025475(a) then return a; end if; end do: end if; end proc: # R. J. Mathar, Jun 06 2013 # alternative: N:= 10^5: # to get all terms <= N Primes:= select(isprime, [2,(2*i+1 $ i = 1 .. floor((sqrt(N)-1)/2))]): sort([1,seq(seq(p^i, i=2..floor(log[p](N))),p=Primes)]); # Robert Israel, Jul 27 2015
A025475 = Select[ Range[ 2, 10000 ], ! PrimeQ[ # ] && Mod[ #, # - EulerPhi[ # ] ] == 0 & ] A025475 = Sort[ Flatten[ Table[ Prime[n]^i, {n, 1, PrimePi[ Sqrt[10^4]]}, {i, 2, Log[ Prime[n], 10^4]}]]] {1}~Join~Select[Range[10^4], And[! PrimeQ@ #, PrimePowerQ@ #] &] (* Michael De Vlieger, Jul 04 2016 *) Join[{1},Select[Range[100000],PrimePowerQ[#]&&!PrimeQ[#]&]] (* Harvey P. Dale, Oct 29 2023 *)
for(n=1,10000,if(sigma(n)*eulerphi(n)*(1-isprime(n))>(n-1)^2,print1(n,",")))
is_A025475(n)={ ispower(n,,&p) && isprime(p) || n==1 } \\ M. F. Hasler, Sep 25 2011
list(lim)=my(v=List([1]),L=log(lim+.5));forprime(p=2,(lim+.5)^(1/3),for(e=3,L\log(p),listput(v,p^e))); vecsort(concat(Vec(v), apply(n->n^2,primes(primepi(sqrtint(lim\1)))))) \\ Charles R Greathouse IV, Nov 12 2012
list(lim)=my(v=List([1])); for(m=2,logint(lim\=1,2), forprime(p=2,sqrtnint(lim,m), listput(v, p^m))); Set(v) \\ Charles R Greathouse IV, Aug 26 2015
from sympy import primerange A025475_list, m = [1], 10*2 m2 = m**2 for p in primerange(1,m): a = p**2 while a < m2: A025475_list.append(a) a *= p A025475_list = sorted(A025475_list) # Chai Wah Wu, Sep 08 2014
from sympy import primepi, integer_nthroot def A025475(n): if n==1: return 1 def f(x): return int(n-2+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,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 kmax # Chai Wah Wu, Aug 13 2024
f[n_] := Block[{k = t = 1}, While[s = PrimePi[ 10^(n/k)]; s != 0, t = t + s; k++]; t]; Array[f, 15, 0]
a(n)=sum(k=2,10^n,isprimepower(k)>0)+1 \\ Charles R Greathouse IV, Mar 05 2014
a(n)=sum(e=1,n*log(10)\log(2),primepi(sqrtnint(10^n,e)))+1 \\ Charles R Greathouse IV, Mar 05 2014
Comments