cp's OEIS Frontend

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.

Showing 1-7 of 7 results.

A073247 Squarefree numbers k such that k-1 and k+1 are not squarefree.

Original entry on oeis.org

17, 19, 26, 51, 53, 55, 89, 91, 97, 127, 149, 151, 161, 163, 170, 197, 199, 233, 235, 241, 249, 251, 269, 271, 293, 295, 305, 307, 337, 339, 341, 349, 362, 377, 379, 413, 415, 449, 451, 485, 487, 489, 491, 521, 523, 530, 551, 557, 559, 577, 579, 593, 595
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 22 2002

Keywords

Comments

Probably 11*n < a(n) < 12*n for n > 189. - Charles R Greathouse IV, Nov 05 2017
The asymptotic density of this sequence is 1/zeta(2) - 2 * Product_{p prime} (1 - 2/p^2) + Product_{p prime} (1 - 3/p^2) = A059956 - 2*A065474 + A206256 = 0.088145884881346585838... . - Amiram Eldar, Aug 30 2024

Crossrefs

Cf. A268331, A268332, A268333, A268334 (squarefree numbers isolated by more than 2, 3, etc.).

Programs

  • Maple
    sf:= select(numtheory:-issqrfree,[$1..1000]):
    map(t -> `if`(sf[t-1]=sf[t]-1 or sf[t+1]=sf[t]+1,NULL,sf[t]), [$2..nops(sf)-1]); # Robert Israel, Feb 01 2016
  • Mathematica
    Reap[For[n = 0, n <= 1000, n++, If[SquareFreeQ[n] && !SquareFreeQ[n-1] && !SquareFreeQ[n+1], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Feb 26 2019 *)
  • PARI
    is(n)=!issquarefree(n-1) && issquarefree(n) && !issquarefree(n+1) \\ Charles R Greathouse IV, Nov 05 2017
    
  • PARI
    list(lim)=my(v=List(),l1,l2); forfactored(k=9,lim\1+1, if(!issquarefree(k) && !issquarefree(l2) && issquarefree(l1), listput(v,l1[1])); l2=l1; l1=k); Vec(v) \\ Charles R Greathouse IV, Nov 27 2024

A268334 Squarefree numbers differing by more than 5 from any other squarefree number.

Original entry on oeis.org

8061827, 60529549, 82490423, 213819827, 245990821, 360350923, 364661627, 465966527, 494501773, 531794155, 651012673, 661327077, 665519027, 693770521, 765921647, 800254429, 826112857, 836818573, 885970253, 914588627, 930996623, 936321349, 958710973, 992890427, 1069677149
Offset: 1

Views

Author

Keywords

Crossrefs

A268330 Least squarefree number differing by more than n from any other squarefree number.

Original entry on oeis.org

1, 17, 26, 2526, 5876126, 8061827, 8996188226, 2074150570370
Offset: 0

Views

Author

Keywords

Comments

1.8*10^12 < a(7) <= 10735237201449 - Robert Israel, Mar 18 2016
a(8) > 5*10^12. - Giovanni Resta, Apr 11 2016

Examples

			a(2) = 26 because 26 is squarefree but 24,25,27,28 are not.
		

Crossrefs

Programs

  • MATLAB
    B = 10^8; % blocks of size B
    nB = 1000; % nB blocks
    A = [1];
    P = primes(floor(sqrt(nB*B)));
    mmax = 1;
    i0 = 1;
    for k = 0:nB-1  % search squarefrees from i0+1 to i0 + B
      V = true(1, B);
      for i = 1:numel(P)
        p = P(i);
        V([(p^2 - mod(i0,p^2)):p^2:B]) = false;
      end
      SF = find(V) + i0;
      DSF = SF(2:end) - SF(1:end-1);
      i0 = SF(end-2);
      M = min(DSF(1:end-1), DSF(2:end));
      newmax = max(mmax,max(M));
      for i = mmax+1:newmax
        A(i) = SF(1 + find(M>=i, 1, 'first'));
      end
      mmax = newmax;
    end
    for i=1:mmax
      fprintf('%d ',A(i));
    end
    fprintf('\n');  % Robert Israel, Mar 16 2016
  • Mathematica
    (* implementation assumes a(n) is increasing *)
    nsfRun[n_]:=Module[{i=n}, While[!SquareFreeQ[i], i++]; i-n]
    a268330[{low_, high_}, width_]:=Module[{k=width, i, next, r, s, list={}}, For[i=low, i<=high, i+=next, r=nsfRun[i]; If[r0 (* Hartmut F. W. Hoft, Mar 15 2016 *)
    a268330[{0,10000000},1] (* computes a(1)...a(5) *)

Extensions

a(6) from Hartmut F. W. Hoft, Mar 15 2016
a(7) from Giovanni Resta, Apr 11 2016

A268331 Squarefree numbers differing by more than 2 from any other squarefree number.

Original entry on oeis.org

26, 170, 362, 530, 638, 727, 874, 926, 962, 1027, 1126, 1423, 1574, 1774, 1814, 1826, 1861, 2059, 2402, 2526, 2674, 2726, 2782, 2874, 3178, 3482, 3574, 3719, 3774, 3970, 4166, 4474, 4490, 4526, 4654, 5042, 5045, 5374, 5426, 5914, 5930, 6026, 6173, 6254, 6274, 6326, 6418, 6626, 6649, 6726, 7138, 7174
Offset: 1

Views

Author

Keywords

Examples

			26 is a term because 26 is squarefree but 24,25,27,28 are not.
		

Crossrefs

Programs

  • Mathematica
    SequencePosition[Table[If[SquareFreeQ[n],1,0],{n,7200}],{0,0,1,0,0}][[All,1]]+2 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 19 2018 *)

A268333 Squarefree numbers differing by more than 4 from any other squarefree number.

Original entry on oeis.org

5876126, 8061827, 19375679, 27926071, 29002021, 29850943, 39224453, 39728861, 54427974, 56389147, 60529549, 63520174, 67806346, 71987374, 75239979, 82490423, 87011827, 91332377, 97447622, 99368949, 100842249, 107447838, 110196277, 118389143, 134817726, 149840974, 159140777, 161651279
Offset: 1

Views

Author

Keywords

Crossrefs

A369238 Tetraprime numbers differing by more than 3 from any other squarefree number.

Original entry on oeis.org

72474, 106674, 193026, 237522, 261478, 308649, 342066, 370785, 391674, 491322, 604878, 865974, 885477, 931022, 938598, 1005630, 1070727, 1152822, 1186926, 1206822, 1289978, 1306878, 1363326, 1371774, 1392726, 1412918, 1455249, 1528111, 1634227, 1654678, 1688478
Offset: 1

Views

Author

Massimo Kofler, Jan 19 2024

Keywords

Comments

Tetraprimes are the product of four distinct prime numbers (cf. A046386).

Examples

			72474 = 2 * 3 * 47 * 257 is a tetraprime; 72471 = 3 * 7^2 * 17 * 29, 72472 = 2^3 * 9059, 72473 = 23^2 * 137, 72475 = 5^2 * 13 * 223, 72476 = 2^2 * 18119, 72477 = 3^2 * 8053 are all nonsquarefree numbers, so 72474 is a term.
		

Crossrefs

Cf. A046386, A013929. Subsequence of A268332.

Programs

  • Maple
    N:= 3*10^6: # for terms <= N
    P:= select(isprime,[2,seq(i,i=3 .. N/30,2)]): nP:= nops(P):
    filter:= proc(x) not ormap(numtheory:-issqrfree, [x-3,x-2,x-1,x+1,x+2,x+3]) end proc:
    R:= NULL:
    for i1 from 1 to nP do
      r1:= P[i1];
      for i2 from 1 to i1-1 do
        r2:= r1 * P[i2]; if r2 > N/6 then break fi;
        for i3 from 1 to i2-1 do
          r3:= r2 * P[i3]; if r3 > N/2 then break fi;
          for i4 from 1 to i3-1 do
            r:= r3 * P[i4];
            if r > N then break fi;
            if filter(r) then R:= R,r; fi
    od od od od:
    sort([R]); # Robert Israel, Jan 19 2025
  • Mathematica
    f[n_] := Module[{e = FactorInteger[n][[;; , 2]], p}, p = Times @@ e; If[p > 1, 0, If[e == {1, 1, 1, 1}, 1, -1]]]; SequencePosition[Array[f, 2*10^6], {0, 0, 0, 1, 0, 0, 0}][[;; , 1]] + 3 (* Amiram Eldar, Jan 19 2024 *)

A369521 Sphenic numbers differing by more than 3 from any other squarefree number.

Original entry on oeis.org

2526, 44405, 209674, 220209, 234622, 328877, 375823, 409737, 428947, 473673, 540026, 569427, 611174, 736077, 748673, 758423, 781747, 800022, 863722, 889251, 914878, 927622, 973927, 982398, 988478, 994061, 1003474, 1021602, 1072477, 1088877, 1150077, 1157822, 1158451, 1211822
Offset: 1

Views

Author

Massimo Kofler, Jan 25 2024

Keywords

Comments

Sphenic numbers are the product of three distinct primes (cf. A007304).

Examples

			2526 = 2 * 3 * 421 is a sphenic number; 2523 = 3 * 29^2, 2524 = 2^2 * 631, 2525 = 5^2 * 101, 2527 = 7 * 19^2, 2528 = 2^5 * 79, 2529 = 3^2 * 281 are all nonsquarefree numbers, so 2526 is a term.
		

Crossrefs

Cf. A007304, A013929. Subsequence of A268332.

Programs

  • Maple
    N:= 2*10^6: # to get all terms <= N
    P:= select(isprime, [2,seq(i,i=3..N/6,2)]):
    nP:= nops(P): R:= NULL:
    for i from 1 do
     p:= P[i]; if p^3 >= N then break fi;
     for j from i+1 do
       q:= P[j]: if p*q^2 >= N then break fi;
       for k from j+1 to nP do
         x:= p*q*P[k];
         if x > N then break fi;
         if not ormap(numtheory:-issqrfree, [x-3,x-2,x-1,x+1,x+2,x+3]) then R:= R,x fi
    od od od:
    sort([R]); # Robert Israel, Feb 25 2024
  • Mathematica
    f[n_] := Module[{e = FactorInteger[n][[;; , 2]], p}, p = Times @@ e; If[p > 1, 0, If[e == {1, 1, 1}, 1, -1]]]; SequencePosition[Array[f, 2*10^6], {0, 0, 0, 1, 0, 0, 0}][[;; , 1]] + 3 (* Amiram Eldar, Jan 25 2024 *)
Showing 1-7 of 7 results.