A180323 Positive numbers l of the form l = A007913(k^4 - 4*k*m^3), where 1 <= k <= 5*l, 1 <= |m| <= 5*l.
2, 5, 6, 11, 15, 17, 29, 33, 41, 42, 43, 51, 53, 58, 62, 65, 69, 82, 85, 86, 89, 93
Offset: 1
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.
48 is a term since core(48)=3, core(49)=1, core(50)=2, these 3 values being smaller than 48^(1/3).
isok(n) = my(cb = sqrtnint(n, 3)); (core(n) <= cb) && (core(n+1) <= cb) && (core(n+2) <= cb);
/* This program is a little sloppy in testing more points than needed near the start and end, but adding extra code to avoid this case would add to complexity without greatly affecting runtime. */ list(lim,startAt=27)=my(c0,c1,c2); for(c=sqrtnint(startAt\1,3), ceil(sqrtn(lim,3)), my(n=c^3+1,lm=(c+1)^3); while(nc, n+=3; next); c1=core(n+1); if(c1>c, n+=2; next); c0=core(n); if(c0>c, n++; next); print1(n", "); n++)) \\ Charles R Greathouse IV, Jul 16 2015
from operator import mul from functools import reduce from sympy import factorint def A007913(n): return reduce(mul,[1]+[p for p,e in factorint(n).items() if e % 2]) A254625_list, n, c0, c1, c2 = [], 1, 1, 8, 27 for _ in range(10**6): if max(c0,c1,c2) < n: A254625_list.append(n) n += 1 c0, c1, c2 = c1, c2, A007913(n+2)**3 # Chai Wah Wu, Feb 08 2015
182182 is a term, because 182182 = 2*7^2*11*13^2 and 182183 = 23*89^2, so core(182182) = 22 and core(182183) = 23.
core[n_] := Times@@ ((#[[1]] ^ Mod[#[[2]], 2]) & /@ FactorInteger@n); Select[ Range[10^5],# != core[#] == core[#+1]-1 &]
48 is a term since core(48) = 3, core(49) = 1 and core(50) = 2 are all smaller than the square root of 48.
core[n_] := Times@@ ((#[[1]] ^ Mod[#[[2]], 2])& /@ FactorInteger@ n); Select[ Range[10^6], core[#]^2 < # && core[#+1]^2 < # && core[#+2]^2 < # &]
f[p_, e_] := p^Mod[e, 2]; sqfp[n_] := Times @@ f @@@ FactorInteger[n]; powQ[n_] := n == 1 || AllTrue[FactorInteger[n][[;; , 2]], # > 1 &]; sqfp /@ Select[Range[1000], powQ]
s[n_] := If[AllTrue[(f = FactorInteger[n])[[;; , 2]], # == 1 || EvenQ[#] &], i = Position[f[[;; , 2]], 1] // Flatten; Times @@ f[[i, 1]], Nothing]; Array[s, 100]
s(n) = {my(f = factor(n), ans = 1); for(k = 1, #f~, if(f[k,2] > 1 && f[k,2]%2, ans = 0)); if(ans, ans = prod(k = 1, #f~, if(f[k,2] == 1, f[k,1], 1))) }; for(n = 1, 100, if(s(n) > 0, print1(s(n), ", ")))
a(1) = 4 since rad(4) = 1+1; rad(4) - core(4) = 2 - 1 = 1, a nonzero square. a(2) = 18 since 18/2 = 9, and rad(18) - core(18) = 6 - 2 = 4, a nonzero square, etc.
Select[Range[6000], And[IntegerQ[#], # > 0] &[Sqrt[Times @@ FactorInteger[#][[All, 1]] - (Sqrt[#] /. (c_ : 1)*a_^(b_ : 0) :> (c*a^b)^2)] ] &]
isok(k) = my(s=factorback(factorint(k)[, 1])-core(k)); (s>0) && issquare(s); \\ Michel Marcus, Sep 18 2023
from itertools import count, islice from sympy.ntheory.primetest import is_square from sympy import factorint def A363084_gen(startvalue=1): # generator of terms >= startvalue for k in count(max(startvalue,1)): a, b = 1, 1 for p, e in factorint(k).items(): if e&1: a *= p else: b *= p if b>1 and is_square(a*(b-1)): yield k A363084_list = list(islice(A363084_gen(),30)) # Chai Wah Wu, Sep 19 2023
We have 2=A007913(4*k*m^3-k^4) for k=2,m=3. Therefore a(1)=2; furthermore, 3=A007913(4*k*m^3-k^4) for k=m=1. Therefore a(2)=3.
squareFreePart[n_] := Times @@ (#[[1]] ^ Mod[ #[[2]], 2] & /@ FactorInteger@n); fQ[n_] := If[b = 0; SquareFreeQ@n, Block[{k = 1, m}, While[k < 5 n + 1, m = -5 n; While[m < 5 n + 1, a = 4 k*m^3 - k^4; If[a > 0, a = squareFreePart@ a, a = 0]; If[a == n, b = a; Print[{a, k, m}]; Goto@ fini, 0]; m++ ]; k++ ]]; Label@ fini; b == n, False]; k = 1; lst = {}; While[k < 300, If[ fQ@k, AppendTo[lst, k]]; k++ ]; lst (* Robert G. Wilson v, Aug 29 2010 *)
a7913[n_]:=a7913[n]=Times@@(#[[1]]^Mod[#[[2]],2])&[Transpose[FactorInteger[n]]]; Map[a7913[Total[Map[a7913,Binomial[#,Range[0,#]]]]]&,Range[0,50]] (* Peter J. C. Moses, Oct 28 2014 *)
a(n) = core(sum(i=0, n, core(binomial(n,i)))); \\ Michel Marcus, Nov 13 2014
a005117 n = a005117_list !! (n-1) a005117_list = filter ((== 1) . a008966) [1..] -- Reinhard Zumkeller, Aug 15 2011, May 10 2011
[ n : n in [1..1000] | IsSquarefree(n) ];
with(numtheory); a := [ ]; for n from 1 to 200 do if issqrfree(n) then a := [ op(a), n ]; fi; od: t:= n-> product(ithprime(k),k=1..n): for n from 1 to 113 do if(t(n) mod n = 0) then print(n) fi od; # Gary Detlefs, Dec 07 2011 A005117 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if numtheory[issqrfree](a) then return a; end if; end do: end if; end proc: # R. J. Mathar, Jan 09 2013
Select[ Range[ 113], SquareFreeQ] (* Robert G. Wilson v, Jan 31 2005 *) Select[Range[150], Max[Last /@ FactorInteger[ # ]] < 2 &] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *) NextSquareFree[n_, k_: 1] := Block[{c = 0, sgn = Sign[k]}, sf = n + sgn; While[c < Abs[k], While[ ! SquareFreeQ@ sf, If[sgn < 0, sf--, sf++]]; If[ sgn < 0, sf--, sf++]; c++]; sf + If[ sgn < 0, 1, -1]]; NestList[ NextSquareFree, 1, 70] (* Robert G. Wilson v, Apr 18 2014 *) Select[Range[250], MoebiusMu[#] != 0 &] (* Robert D. Rosales, May 20 2024 *)
bnd = 1000; L = vector(bnd); j = 1; for (i=1,bnd, if(issquarefree(i),L[j]=i; j=j+1)); L
{a(n)= local(m,c); if(n<=1,n==1, c=1; m=1; while( cMichael Somos, Apr 29 2005 */
list(n)=my(v=vectorsmall(n,i,1),u,j); forprime(p=2,sqrtint(n), forstep(i=p^2, n, p^2, v[i]=0)); u=vector(sum(i=1,n,v[i])); for(i=1,n,if(v[i],u[j++]=i)); u \\ Charles R Greathouse IV, Jun 08 2012
for(n=1, 113, if(core(n)==n, print1(n, ", "))); \\ Arkadiusz Wesolowski, Aug 02 2016
S(n) = my(s); forsquarefree(k=1,sqrtint(n),s+=n\k[1]^2*moebius(k)); s; a(n) = my(min=1, max=231, k=0, sc=0); if(n >= 144, min=floor(zeta(2)*n - 5*sqrt(n)); max=ceil(zeta(2)*n + 5*sqrt(n))); while(min <= max, k=(min+max)\2; sc=S(k); if(abs(sc-n) <= sqrtint(n), break); if(sc > n, max=k-1, if(sc < n, min=k+1, break))); while(!issquarefree(k), k-=1); while(sc != n, my(j=1); if(sc > n, j = -1); k += j; sc += j; while(!issquarefree(k), k += j)); k; \\ Daniel Suteu, Jul 07 2022
first(n)=my(v=vector(n),i); forsquarefree(k=1,if(n<268293,(33*n+30)\20,(n*Pi^2/6+0.058377*sqrt(n))\1), if(i++>n, return(v)); v[i]=k[1]); v \\ Charles R Greathouse IV, Jan 10 2023
A5117=[1..3]; A005117(n)={if(n>#A5117, my(N=#A5117); A5117=Vec(A5117, max(n+999, N*5\4)); iferr(forsquarefree(k=A5117[N]+1, #A5117*Pi^2\6+sqrtint(#A5117)\17+11, A5117[N++]=k[1]),E,)); A5117[n]} \\ M. F. Hasler, Aug 08 2025
from sympy.ntheory.factor_ import core def ok(n): return core(n, 2) == n print(list(filter(ok, range(1, 114)))) # Michael S. Branicky, Jul 31 2021
from itertools import count, islice from sympy import factorint def A005117_gen(startvalue=1): # generator of terms >= startvalue return filter(lambda n:all(x == 1 for x in factorint(n).values()),count(max(startvalue,1))) A005117_list = list(islice(A005117_gen(),20)) # Chai Wah Wu, May 09 2022
from math import isqrt from sympy import mobius def A005117(n): def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)) m, k = n, f(n) while m != k: m, k = k, f(k) return m # Chai Wah Wu, Jul 22 2024
Comments