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-6 of 6 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

A268332 Squarefree numbers differing by more than 3 from any other squarefree number.

Original entry on oeis.org

2526, 44405, 47527, 47973, 55779, 72474, 101037, 106327, 106674, 109023, 110107, 133577, 153173, 165574, 183553, 186247, 193026, 196747, 208847, 209674, 212127, 218527, 220209, 234622, 237522, 245149, 261478, 266853, 269953, 308649, 328877, 334522, 342066, 364151, 370785, 375823
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    SF:= select(numtheory:-issqrfree, [$1..10^6]):
    SF[select(i -> SF[i]-SF[i-1]>=4  and SF[i+1]-SF[i]>=4, [$2..nops(SF)-1])]; # Robert Israel, Feb 02 2016

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

A270996 T(i, j) = k is the least squarefree number with a run of exactly i>=0 nonsquarefree numbers immediately preceding k and a run of exactly j>=0 nonsquarefree numbers immediately succeeding k.

Original entry on oeis.org

2, 1, 3, 10, 17, 7, 101, 149, 151, 47, 246, 51, 26, 97, 8474, 1685, 8479, 727, 1861, 241, 843, 22026, 849, 3178, 2526, 10826, 30247, 22019, 217077, 190453, 813251, 55779, 183553, 5045, 580847, 826823
Offset: 0

Views

Author

Hartmut F. W. Hoft, Mar 28 2016

Keywords

Comments

The sequence a(n) = T(i, j) represents the traversal of this matrix by its successive rising antidiagonals.
a(2*i*(i+1)) = A270344(i), for all i >= 0.

Examples

			a(13) = T(1, 3) = 97 since 96, 98, 99 and 100 are nonsquarefree while 95, 97, and 101 are squarefree, and 97 is the smallest number surrounded by the 1,3 pattern.
The matrix T(i, j) with first 8 complete antidiagonals together with some additional elements including the first 7 elements on the diagonal which are A270344(0)..A270344(6):
-------------------------------------------------------------------------
i\j      0       1       2       3        4         5          6        7
-------------------------------------------------------------------------
0:       2       3       7      47     8474       843      22019   826823
1:       1      17     151      97      241     30247     580847   217069
2:      10     149      26    1861    10826      5045     204322 16825126
3:     101      51     727    2526   183553   1944347   28591923 43811049
4:     246    8479    3178   55779  5876126  19375679   67806346
5:    1685     849  813251  450553 29002021   8061827 2082929927
6:   22026  190453  200854 4100277 97447622 245990821 8996188226
7:  217077  826831 7507930 90557979
T(6, 5) = 245990821, T(5, 6) = 2082929927, and all numbers in antidiagonal 11 are larger than 10^8.
		

Crossrefs

Programs

  • Mathematica
    (* The function computes the least number in the specified interval *)
    nsfRun[n_] := Module[{i=n}, While[!SquareFreeQ[i], i++]; i-n]
    a270996[{low_, high_},{widthL_, widthR_}] := Module[{i=low, r, s, first=0}, While[i<=high, r=nsfRun[i]; If[r != widthL, i+=r+1, s=nsfRun[i+r+1]; If[s != widthR, If[s != widthL, i+=r+s+2, i+=r+1], first=i+r; i=high+1]]]; first]
    a270996[{0, 5000},{2, 3}] (* computes a(18) = T(2, 3) *)
Showing 1-6 of 6 results.