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.

Previous Showing 11-20 of 27 results. Next

A073248 Squarefree numbers k such that k+1 is also squarefree, but k-1 and k+2 are not.

Original entry on oeis.org

10, 46, 61, 73, 82, 118, 122, 133, 145, 154, 173, 190, 205, 226, 246, 262, 273, 277, 290, 298, 313, 326, 334, 370, 373, 385, 406, 421, 426, 442, 457, 473, 478, 493, 505, 514, 526, 537, 565, 573, 586, 601, 606, 622, 626, 658, 673, 694, 709, 730, 733, 745
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 22 2002

Keywords

Crossrefs

Programs

  • Maple
    state:= [true,true,true,true]:
    R:= NULL: count:= 0:
    for n from 1 while count < 100 do
      state:= [state[2],state[3],state[4],numtheory:-issqrfree(n)];
      if state = [false,true,true,false] then
         R:= R, n-2; count:= count+1
      fi
    od:
    R; # Robert Israel, Mar 02 2022
  • Mathematica
    Transpose[SequencePosition[Table[If[SquareFreeQ[n],1,0],{n,800}],{0,1,1,0}]][[1]]+1 (* The program uses the SequencePosition function from Mathematica version 10 *) (* Harvey P. Dale, Mar 09 2016 *)

A068088 n-3, n-2, n-1, n+1, n+2 and n+3 are squarefree.

Original entry on oeis.org

4, 32, 36, 40, 68, 104, 108, 112, 140, 180, 184, 212, 216, 220, 256, 284, 320, 356, 392, 396, 400, 432, 436, 464, 468, 500, 544, 612, 616, 644, 680, 716, 756, 760, 788, 792, 796, 860, 896, 900, 904, 936, 940, 968, 1004, 1008, 1040, 1044, 1112, 1116, 1120, 1156, 1188, 1192, 1220, 1256, 1260, 1264
Offset: 1

Views

Author

Amarnath Murthy, Feb 18 2002

Keywords

Comments

No four consecutive numbers can all be squarefree, as one of them is divisible by 2^2 = 4.
From 28 to 44 there are 12 squarefree numbers among 15 consecutive integers. Other examples are 100 to 116 and 212 to 228.
The largest possible run of consecutive multiples of 4 in the sequence is 3: If n, n+4 and n+8 are in the sequence then n+4 and hence n-5 and n+13 must be divisible by 9, so neither n-4 nor n+12 can be in the sequence. - Ulrich Schimke, Apr 13 2002

Examples

			36 is a term as 33,34,35 and 37,38,39 are two sets of three consecutive squarefree numbers.
		

Crossrefs

Cf. A007675, A039833. Equals 4*A283628.

Programs

  • Maple
    select(t -> andmap(numtheory:-issqrfree, [t-3,t-2,t-1,t+1,t+2,t+3]), [seq(i,i=4..2000,4)]); # Robert Israel, Jun 05 2018
  • Mathematica
    << NumberTheory`NumberTheoryFunctions` lst={};Do[If[SquareFreeQ[n-1]&&SquareFreeQ[n+1]&&SquareFreeQ[n-2]&&SquareFreeQ[n+2]&&SquareFreeQ[n-3]&&SquareFreeQ[n+3],AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Oct 26 2009 *)

Extensions

Corrected and extended by Ulrich Schimke, Apr 13 2002
Further correction from Harvey P. Dale, May 01 2002
Offset changed to 1 by Michel Marcus, May 24 2014

A228649 Numbers n such that n-1, n and n+1 are all squarefree.

Original entry on oeis.org

2, 6, 14, 22, 30, 34, 38, 42, 58, 66, 70, 78, 86, 94, 102, 106, 110, 114, 130, 138, 142, 158, 166, 178, 182, 186, 194, 202, 210, 214, 218, 222, 230, 238, 254, 258, 266, 282, 286, 302, 310, 318, 322, 330, 346, 354, 358, 366, 382, 390, 394, 398, 402, 410, 418, 430, 434, 438, 446, 454, 462, 466, 470, 482, 498
Offset: 1

Views

Author

Adam P. Goucher, Aug 29 2013

Keywords

Comments

Equivalently, a positive integer n is comfortably squarefree if and only if n^3 - n is squarefree. The 'if' direction is obvious from the factorization n(n-1)(n+1), and the converse follows from the coprimality of n, n - 1 and n + 1.
The asymptotic density of comfortably squarefree numbers is the product over all primes of 1 - 3/p^2, which is A206256 = 0.125486980905....
See also comments in A007675.

Programs

  • Maple
    with(numtheory):
    a := n -> `if`(issqrfree(n-1) and issqrfree(n) and issqrfree(n+1), n, NULL);
    seq(a(n), n = 1..500); # Peter Luschny, Jan 18 2014
  • Mathematica
    Select[Range[500], (SquareFreeQ[# - 1] && SquareFreeQ[#] && SquareFreeQ[# + 1]) &] (* Adam P. Goucher *)
    Select[Range[2, 500, 2], (MoebiusMu[# - 1] MoebiusMu[#] MoebiusMu[# + 1]) != 0 &] (* Alonso del Arte, Jan 16 2014 *)
    Flatten[Position[Partition[Boole[SquareFreeQ/@Range[500]],3,1],{1,1,1}]]+1 (* Harvey P. Dale, Jan 14 2015 *)
    SequencePosition[Table[If[SquareFreeQ[n],1,0],{n,500}],{1,1,1}][[All,1]]+1 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 02 2018 *)
  • PARI
    is(n)=issquarefree(n-1)&&issquarefree(n)&&issquarefree(n+1) \\ Charles R Greathouse IV, Aug 29 2013

Formula

a(n) = A007675(n) + 1. - Giovanni Resta, Aug 29 2013

A378369 Distance between n and the least nonsquarefree number >= n.

Original entry on oeis.org

3, 2, 1, 0, 3, 2, 1, 0, 0, 2, 1, 0, 3, 2, 1, 0, 1, 0, 1, 0, 3, 2, 1, 0, 0, 1, 0, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 3, 2, 1, 0, 2, 1, 0, 0, 3, 2, 1, 0, 3, 2, 1, 0, 2, 1, 0, 0, 3, 2, 1, 0, 0, 2, 1, 0, 3, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Dec 01 2024

Keywords

Comments

All terms are 0, 1, 2, or 3 (cf. A078147).

Crossrefs

Adding n to each term a(n) gives A120327.
Positions of 0 are A013929.
Positions of 1 are A373415.
Positions of 2 are A378458.
Positions of 3 are A007675.
Sequences obtained by adding n to each term are placed in parentheses below.
The version for primes is A007920 (A007918).
The version for perfect powers is A074984 (A377468).
The version for squarefree numbers is A081221 (A067535).
The version for non-perfect powers is A378357 (A378358).
The version for prime powers is A378370 (A000015).
The version for non prime powers is A378371 (A378372).
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.
A120992 gives run-lengths of squarefree numbers increasing by one.

Programs

  • Mathematica
    Table[NestWhile[#+1&,n,SquareFreeQ[#]&]-n,{n,100}]

A073251 Numbers k such that k, k+1 and k+2 are nonprime and squarefree.

Original entry on oeis.org

33, 85, 93, 141, 185, 201, 213, 217, 253, 265, 285, 301, 321, 393, 445, 453, 469, 481, 517, 533, 553, 581, 589, 609, 633, 669, 697, 705, 713, 753, 777, 789, 793, 805, 813, 869, 893, 897, 901, 913, 921, 933, 957, 985, 993, 1001, 1005, 1041, 1045, 1065, 1113
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 22 2002

Keywords

Comments

k-1 and k+3 are not squarefree. Proof: k is odd, otherwise k or k+2 would be divisible by 4. Thus k+1 is even and not divisible by 4, hence k-1 and k+3 are divisible by 4.

Crossrefs

Programs

  • Mathematica
    f[upto_]:=Module[{pp=PrimePi[upto],n},lst=Partition[Complement[Range[upto], Prime[Range[pp]]],3,1];Transpose[Select[lst,And@@SquareFreeQ/@#&]][[1]]]; f[1200] (* Harvey P. Dale, Mar 21 2011 *)
  • PARI
    isok1(k) = !isprime(k) && issquarefree(k); \\ A000469
    isok(k) = isok1(k) && isok1(k+1) && isok1(k+2); \\ Michel Marcus, Mar 25 2021

Extensions

Edited by Klaus Brockhaus, Aug 07 2006

A328016 Numbers k such that k, k+1, ... k+6 are all cubefree (A004709).

Original entry on oeis.org

1, 9, 17, 33, 41, 57, 65, 73, 89, 97, 113, 137, 145, 153, 169, 177, 193, 201, 209, 217, 225, 233, 257, 273, 281, 289, 305, 313, 329, 353, 361, 385, 393, 409, 417, 425, 433, 441, 449, 465, 473, 489, 505, 521, 529, 545, 553, 569, 577, 585, 601, 609, 633, 641, 649, 657
Offset: 1

Views

Author

Amiram Eldar, Oct 01 2019

Keywords

Comments

There cannot be 8 consecutive cubefree numbers since one of them must be divisible by 8 = 2^3.
All the terms are congruent to 1 mod 8.
The asymptotic density of this sequence is A328017.

Examples

			9 is in the sequence since the numbers 9, 10, ... 15 are all cubefree.
		

Crossrefs

Programs

  • Mathematica
    cubeFreeQ[n_] := FreeQ[FactorInteger[n], {, k /; k > 2}]; aQ[n_] := AllTrue[n + Range[0, 6], cubeFreeQ]; Select[Range[650], aQ]

A194002 Numbers k that are the start of a sequence of 7 maximally-squarefree numbers.

Original entry on oeis.org

1, 65, 137, 209, 217, 281, 353, 433, 641, 713, 785, 793, 857, 937, 1001, 1217, 1289, 1361, 1433, 1505, 1577, 1657, 1793, 1865, 1937, 2081, 2089, 2233, 2305, 2377, 2441, 2513, 2585, 2665, 2729, 2801, 2953, 3017, 3089, 3161, 3241, 3305, 3313, 3457, 3529, 3593
Offset: 1

Views

Author

Keywords

Comments

k, k+1, k+2, k+4, k+5, and k+6 are squarefree; k+3 is divisible by 4 but no higher power of 2 and no other prime squared.
From Amiram Eldar, Nov 28 2023: (Start)
All the terms are of the form 8*k + 1.
The numbers of terms not exceeding 10^k for k = 1, 2, ... , are 1, 2, 14, 140, 1384, 13774, 137784, 1378053, 13779491, 137794128, 1377940943, ... . Apparently, the asymptotic density of this sequence exists and equals 0.0137794... . (End)

Crossrefs

Subsequence of A005117, A007674, A007675 and A017077.

Programs

  • Mathematica
    sfQ[n_]:=Module[{c4=FactorInteger[n[[4]]],r=Drop[n,{4}]},First[c4] == {2,2} && Max[Transpose[Rest[c4]][[2]]]==1&&And@@SquareFreeQ/@r]; Join[{1}, Transpose[ Select[Partition[Range[2,3600],7,1],sfQ]][[1]]] (* Harvey P. Dale, Nov 22 2011 *)
  • PARI
    ap(n)={forstep(k=1,n,8,
    if(issquarefree(k)&&issquarefree(k+1)&&issquarefree(k+2)&&
       issquarefree((k+3)\2)&&
       issquarefree(k+4)&&issquarefree(k+5)&&issquarefree(k+6),
      print1(k", ")))}

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) *)

A369021 Numbers k such that k, k+1 and k+2 have the same maximal exponent in their prime factorization.

Original entry on oeis.org

5, 13, 21, 29, 33, 37, 41, 57, 65, 69, 77, 85, 93, 98, 101, 105, 109, 113, 129, 137, 141, 157, 165, 177, 181, 185, 193, 201, 209, 213, 217, 221, 229, 237, 253, 257, 265, 281, 285, 301, 309, 317, 321, 329, 345, 353, 357, 365, 381, 389, 393, 397, 401, 409, 417, 429
Offset: 1

Views

Author

Amiram Eldar, Jan 12 2024

Keywords

Comments

Numbers k such that A051903(k) = A051903(k+1) = A051903(k+2).
The asymptotic density of this sequence is d(2,3) + Sum_{k>=2} (d(k+1,3) - d(k,3) + 3*d2(k,2,1) - 3*d2(k,1,2)) = 0.13122214221443994377..., where d(k,m) = Product_{p prime} (1 - m/p^k) and d2(k,m1,m2) = Product_{p prime} (1 - m1/p^k - m2/p^(k+1)).

Crossrefs

Subsequence of A369020.
Subsequences: A007675, A071319.

Programs

  • Mathematica
    emax[n_] := emax[n] = Max[FactorInteger[n][[;; , 2]]]; emax[1] = 0; Select[Range[200], emax[#] == emax[# + 1] == emax[#+2] &]
  • PARI
    emax(n) = if(n == 1, 0, vecmax(factor(n)[, 2]));
    lista(kmax) = {my(e1 = 0, e2 = 0, e3); for(k = 3, kmax, e3 = emax(k); if(e1 == e2 && e2 == e3, print1(k-2, ", ")); e1 = e2; e2 = e3);}

A124569 Numbers k such that k, k+2, k+4 and k+6 are squarefree.

Original entry on oeis.org

1, 11, 13, 15, 17, 29, 31, 33, 35, 37, 51, 53, 55, 65, 67, 83, 85, 87, 89, 91, 101, 103, 105, 107, 109, 127, 137, 139, 155, 157, 159, 161, 177, 179, 181, 191, 193, 195, 197, 199, 209, 211, 213, 215, 217, 227, 229, 231, 233, 235, 247, 249, 251, 253, 263, 265, 267
Offset: 1

Views

Author

Zak Seidov, Dec 27 2006

Keywords

Comments

Numbers k, k+2, k+4 and k+6 are four successive odd squarefree numbers.

Crossrefs

Programs

  • Maple
    filter:= proc(n) andmap(numtheory:-issqrfree,[n,n+2,n+4,n+6]) end proc:
    select(filter, [seq(i,i=1..1000,2)]); # Robert Israel, Jun 08 2021
  • Mathematica
    okQ[n_] := AllTrue[n + {0, 2, 4, 6}, SquareFreeQ];
    Select[Range[1, 1000, 2], okQ] (* Jean-François Alcover, May 18 2023 *)
  • PARI
    isok(n) = issquarefree(n) && issquarefree(n+2) && issquarefree(n+4) && issquarefree(n+6); \\ Michel Marcus, Oct 11 2013
Previous Showing 11-20 of 27 results. Next