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-10 of 16 results. Next

A055556 Differences of arithmetic progressions of which the terms give chains of n consecutive nonsquarefree numbers if started with terms of A045882(n) or A051681(n).

Original entry on oeis.org

4, 72, 58800, 1757711340, 54169994838960, 950645196424756293060600, 94630125612279498512066506747436400, 14119054639791549212725337736060964803166626000
Offset: 1

Views

Author

Labos Elemer, Jul 10 2000

Keywords

Examples

			For n=5, the difference of the relevant progression is 54169994838960.
		

Crossrefs

Formula

a(n) = LCM(x, x+1, ..., x+n-1), where x = A045882(n).

A053806 Numbers where a gap begins in the sequence of squarefree numbers (A005117).

Original entry on oeis.org

4, 8, 12, 16, 18, 20, 24, 27, 32, 36, 40, 44, 48, 52, 54, 56, 60, 63, 68, 72, 75, 80, 84, 88, 90, 92, 96, 98, 104, 108, 112, 116, 120, 124, 128, 132, 135, 140, 144, 147, 150, 152, 156, 160, 162, 164, 168, 171, 175, 180, 184, 188, 192, 196, 198, 200, 204, 207, 212
Offset: 1

Views

Author

N. J. A. Sloane, Apr 07 2000

Keywords

Examples

			The first gap is at 4 and has length 1; the next starts at 8 and has length 2 (since neither 8 nor 9 are squarefree).
		

Crossrefs

Programs

  • PARI
    is(n)=!issquarefree(n) && issquarefree(n-1) \\ Charles R Greathouse IV, Nov 05 2017
    
  • PARI
    list(lim)=my(v=List(),t); forfactored(n=4,lim\1, if(vecmax(n[2][,2])>1, if(!t, listput(v,n[1])); t=1, t=0)); Vec(v) \\ Charles R Greathouse IV, Nov 05 2017

A045882 Smallest term of first run of (at least) n consecutive integers which are not squarefree.

Original entry on oeis.org

4, 8, 48, 242, 844, 22020, 217070, 1092747, 8870024, 221167422, 221167422, 47255689915, 82462576220, 1043460553364, 79180770078548, 3215226335143218, 23742453640900972, 125781000834058568
Offset: 1

Views

Author

Keywords

Comments

Solution for n=10 is same as for n=11.
This sequence is infinite and each term initiates a suitable arithmetic progression with large differences like squares of primorials or other suitable products of primes from prime factors being on power 2 in terms and in chains after. Proof includes solution of linear Diophantine equations and math. induction. See also A068781, A070258, A070284, A078144, A049535, A077640, A077647, A078143 of which first terms are recollected here. - Labos Elemer, Nov 25 2002

Examples

			a(3) = 48 as 48, 49 and 50 are divisible by squares.
n=5 -> {844=2^2*211; 845=5*13^2; 846=2*3^2*47; 847=7*11^2; 848=2^4*53}.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 242, p. 67, Ellipses, Paris 2008.

Crossrefs

Cf. A013929, A053806, A049535, A077647, A078143. Also A069021 and A051681 are different versions.

Programs

  • Mathematica
    cnt = 0; k = 0; Table[While[cnt < n, k++; If[! SquareFreeQ[k], cnt++, cnt = 0]]; k - n + 1, {n, 7}]
  • PARI
    a(n)=my(s);for(k=1,9^99,if(issquarefree(k),s=0,if(s++==n,return(k-n+1)))) \\ Charles R Greathouse IV, May 29 2013

Formula

a(n) = 1 + A020754(n+1). - R. J. Mathar, Jun 25 2010
Correction from Jeppe Stig Nielsen, Mar 05 2022: (Start)
a(n) = 1 + A020754(n+1) for 1 <= n < 11.
a(n) = 1 + A020754(n) for 11 <= n < N where N is unknown.
Possibly a(n) = 1 + A020754(n-d) for some higher n, depending on how many repeated terms the sequence has. (End)
a(n) <= A061742(n) = A002110(n)^2 is the trivial bound obtained from the CRT. - Charles R Greathouse IV, Sep 06 2022

Extensions

a(9)-a(11) from Patrick De Geest, Nov 15 1998, Jan 15 1999
a(12)-a(15) from Louis Marmet (louis(AT)marmet.org) and David Bernier (ezcos(AT)yahoo.com), Nov 15 1999
a(16) was obtained as a result of a team effort by Z. McGregor-Dorsey et al. [Louis Marmet (louis(AT)marmet.org), Jul 27 2000]
a(17) was obtained as a result of a team effort by E. Wong et al. [Louis Marmet (louis(AT)marmet.org), Jul 13 2001]
a(18) was obtained as a result of a team effort by L. Marmet et al.

A373199 Least k such that the k-th maximal run of nonsquarefree numbers has length n. Position of first appearance of n in A053797.

Original entry on oeis.org

1, 2, 13, 68, 241, 6278, 61921, 311759, 2530539
Offset: 1

Views

Author

Gus Wiseman, Jun 08 2024

Keywords

Comments

A run of a sequence (in this case A013929) is an interval of positions at which consecutive terms differ by one. The a(n)-th run of nonsquarefree numbers begins with A045882 = A051681, subset of A053806.

Examples

			The maximal runs of nonsquarefree numbers begin:
   4
   8   9
  12
  16
  18
  20
  24  25
  27  28
  32
  36
  40
  44  45
  48  49  50
  52
  54
  56
  60
  63  64
The a(n)-th rows are:
     4
     8     9
    48    49    50
   242   243   244   245
   844   845   846   847   848
For example, (48, 49, 50) is the first maximal run of 3 nonsquarefree numbers, so a(3) = 13.
		

Crossrefs

For composite instead of nonsquarefree we have A073051.
The version for squarefree runs is A373128.
For prime instead of nonsquarefree we have A373400.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.

Programs

  • Mathematica
    seq=Length/@Split[Select[Range[10000],!SquareFreeQ[#]&],#1+1==#2&];
    spna[y_]:=Max@@Select[Range[Length[y]],SubsetQ[y,Range[#]]&];
    Table[Position[seq,i][[1,1]],{i,spna[seq]}]

A020754 Increasing gaps between squarefree numbers (lower end).

Original entry on oeis.org

1, 3, 7, 47, 241, 843, 22019, 217069, 1092746, 8870023, 221167421, 47255689914, 82462576219, 1043460553363, 79180770078547, 3215226335143217, 23742453640900971, 125781000834058567
Offset: 1

Views

Author

Keywords

Comments

We only consider gaps that set new records. The first gap of size 12 occurs (at 221167421) before the first gap of size 11 (at 262315466) and so for n>10, the n-th term in this sequence does not correspond to the first gap of length n. See A020753. - Nathan McNew, Dec 02 2020
The length of these runs are significantly shorter than would be predicted by a naive random model (for such a model see, e.g., Gordon, Schilling, & Waterman). For example, with n = a(18) and p = 6/Pi^2 the expected largest run is about 77.9 with variance 6.7, while A020753(18) = 18 which is 23 standard deviations smaller. - Charles R Greathouse IV, Oct 29 2021

Examples

			The first gap in A005117 occurs between 1 and 2 and has length 1. The next largest gap occurs between 3 and 5 and has length 2. The next largest gap is between 7 and 10 and has length 3. Etc.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=11*10^5,sf,df},sf=Select[Range[nn],SquareFreeQ];df=Differences[sf];DeleteDuplicates[ Thread[{Most[sf],df}],GreaterEqual[#1[[2]],#2[[2]]]&]][[;;,1]] (* Harvey P. Dale, May 24 2023 *)
  • PARI
    A020754(n)=for(k=L=1, 9e9, issquarefree(k)||next; k-L>=n&&return(L); L=k) \\ For illustrative purpose only, not useful for n>10. - M. F. Hasler, Dec 28 2015
    
  • PARI
    r=0; L=1; forsquarefree(n=2,10^8,t=n[1]-L; if(t>r,r=t; print1(L", ")); L=n[1]) \\ Charles R Greathouse IV, Oct 22 2021

Formula

a(n) = A020755(n) - A020753(n); also a(n) = A020754(n+[n>10]) - 1 at least for n < 19. - M. F. Hasler, Dec 28 2015

Extensions

Thanks to Christian G. Bower for additional comments.
a(16)-a(18) from A045882 by Jens Kruse Andersen, May 01 2015

A081221 Number of consecutive numbers >= n having at least one square divisor > 1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 10 2003

Keywords

Comments

The first time terms 0..7 occur is at n = 1, 4, 8, 48, 242, 844, 22020, 217070. - Antti Karttunen, Sep 22 2017

Examples

			For n = 3, 3 is a squarefree number, thus a(3) = 0.
For n = 48, neither 48 = 2^4 * 3 nor 49 = 7^2, nor 50 = 2^2 * 5 are squarefree, but 51 = 3*17 is, thus a(48) = 3. - _Antti Karttunen_, Sep 22 2017
		

Crossrefs

Programs

  • Mathematica
    Flatten@ Map[If[First@ # == 0, #, Reverse@ Range@ Length@ #] &, SplitBy[Table[DivisorSum[n, 1 &, And[# > 1, IntegerQ@ Sqrt@ #] &], {n, 120}], # > 0 &]] (* Michael De Vlieger, Sep 22 2017 *)
  • PARI
    A081221(n) = { my(k=0); while(!issquarefree(n+k),k++); k; }; \\ Antti Karttunen, Sep 22 2017
    
  • Python
    from itertools import count
    from sympy import factorint
    def A081221(n): return next(m for m in count(0) if max(factorint(n+m).values(),default=0)<=1) # Chai Wah Wu, Dec 04 2024

Formula

mu(k) = 0 for n <= k < n+a(n) and mu(n+a(n)) <> 0, where mu = A008683 (Moebius function).
a(n)*mu(n) = 0.
a(A068781(n)) > 0.
a(n) = A067535(n) - n. - Amiram Eldar, Oct 10 2023

A077647 Smallest term of a run of at least 8 consecutive integers which are not squarefree.

Original entry on oeis.org

1092747, 7216618, 8870024, 8870025, 14379271, 22635347, 24816974, 25047846, 33678771, 33908368, 33908369, 34394371, 34682346, 37923938, 49250144, 49250145, 53379270, 69147868, 69147869, 70918820, 70918821, 71927247, 72913022, 83605071, 85972019, 90571646
Offset: 1

Views

Author

Labos Elemer, Nov 18 2002

Keywords

Examples

			n=8870024: squares dividing n+j (j=0...8) i.e. 9 consecutive integers are as follows {4,25,121,841,4,49,961,9,16}
		

Crossrefs

Cf. A045882 (first k-chain), A068781 (2-chains), A070258 (3-chains), A070284 (4-chains), A078144 (5-chains), A049535 (6-chains), A077640 (7-chains), A077647 (8-chains), A078143 (9-chains), A268313 (10-chains), A268314 (11-chains).

Programs

  • Mathematica
    s8[x_] := Apply[Plus, Table[Abs[MoebiusMu[x+j]], {j, 0, 7}]]; Do[If[s8[n] == 0, Print[n]], {n, 10^8}]
    Flatten[Position[Partition[SquareFreeQ/@Range[91000000],8,1],_?(Union[#]=={False}&),{1},Heads->False]]
  • PARI
    for(n=1,10^8,forstep(k=7,0,-1,issquarefree(n+k)&&(n+=k)&&next(2));print1(n",")) \\ M. F. Hasler, Feb 03 2016

Formula

A077647 = { A077640[k] | A077640[k+1] = A077640[k]+1 }. - M. F. Hasler, Feb 01 2016

A078143 Smallest term of a run of at least 9 consecutive integers which are not squarefree.

Original entry on oeis.org

8870024, 33908368, 49250144, 69147868, 70918820, 111500620, 112931372, 164786748, 167854344, 200997948, 203356712, 207543320, 211014920, 216785256, 221167422, 221167423, 221167424, 236645624, 240574368, 262315467, 262315468
Offset: 1

Views

Author

Labos Elemer, Nov 22 2002

Keywords

Comments

The sequence includes an infinite family of arithmetic progressions. Such AP's can be constructed to each term, with large differences [like squares of primorials, A061742(7)]. It is necessary to solve suitable systems of linear Diophantine equations. E.g.: arithmetic progression subsequences of starting 9-chains is {mk+69147868+j} where j=0..8, m=510510^2 because square prime factors of a(4)+j=68147868+j are 4, 49, 121, 169, 4, 9, 289, 25, 4 resp. for j=0..8; k goes to infinity; 7th primorial is sufficient, 9th is not necessary. Construction is provable for arbitrary long [>9] chains. - Labos Elemer, Nov 25 2002
More precisely, if in one run {a(n)+j, j=0..8} the maximum smallest square factor is p^2, then an infinite subsequence is given by {a(n)+(p#)^2*k, k=0..oo}, where p# = A034386(p). One may get a smaller step taking the least L^2 which has a square factor in common with each of the 9 consecutive terms. - M. F. Hasler, Feb 03 2016

Crossrefs

Cf. A013929, A045882 (first of the k-chains), A051681.
Cf. A068781 (2-chains), A070258 (3-chains), A070284 (4-chains), A078144 (5-chains), A049535 (6-chains), A077640 (7-chains), A077647 (8-chains), A078143 (9-chains), A268313 (10-chains), A268314 (11-chains).

Programs

  • Mathematica
    s9[x_] := Apply[Plus, Table[Abs[MoebiusMu[x+j]], {j, 0, 8}]]; Do[If[Equal[s9[n], 0], Print[n]], {n, 8000000, 1000000000}]
  • PARI
    is(n)=for(i=n,n+8, if(!issquarefree(i), return(0))); 1 \\ Charles R Greathouse IV, Nov 05 2017

Formula

A078143 = { A077647[k] | A077647[k+1] = A077647[k]+1 } = { A077640[k] | A077640[k+2] = A077640[k]+2 } = { A078144[k] | A078144[k+4] = A078144[k]+4 } etc. Note that A049535 is defined differently. - M. F. Hasler, Feb 01 2016
a(n) < 4666864390*n. With more work this bound can be decreased significantly. - Charles R Greathouse IV, Nov 05 2017

Extensions

a(6)-a(21) from Donovan Johnson, Nov 26 2008

A077640 Smallest term of a run of at least 7 consecutive integers which are not squarefree.

Original entry on oeis.org

217070, 671346, 826824, 1092747, 1092748, 1427370, 2097048, 2779370, 3112819, 3306444, 3597723, 3994820, 4063774, 4442874, 4630544, 4842474, 5436375, 5479619, 5610644, 5634122, 6315019, 6474220, 6626319, 6677864, 7128471, 7216618, 7216619, 7295448, 7507923
Offset: 1

Views

Author

Labos Elemer, Nov 14 2002

Keywords

Examples

			n=8870024: squares dividing n+j (j=0...8) i.e. 9 consecutive integers are as follows {4,25,121,841,4,49,961,9,16}.
		

Crossrefs

Cf. A068781 (2-chains), A070258 (3-chains), A070284 (4-chains), A078144 (5-chains), A049535 (6-chains), A077640 (7-chains), A077647 (8-chains), A078143 (9-chains), A268313 (10-chains), A268314 (11-chains).

Programs

  • MATLAB
    N = 10^7; % to get all terms <= N-6
    T = zeros(1,N);
    for m = 2:floor(sqrt(N))
       T([m^2 : m^2 : N]) = 1;
    end
    S = T(1:N-6).*T(2:N-5).*T(3:N-4).*T(4:N-3).*T(5:N-2).*T(6:N-1).*T(7:N);
    find(S)  % Robert Israel, Feb 03 2016
    
  • Mathematica
    s7[x_] := Apply[Plus, Table[Abs[MoebiusMu[x+j]], {j, 0, 6}]]; Do[If[s7[n] == 0, Print[n]], {n, 10^7}]
    Flatten[Position[Partition[SquareFreeQ/@Range[7000000],7,1],?(Union[#] == {False}&),{1},Heads->False]] (* _Harvey P. Dale, May 24 2014 *)
    SequencePosition[Table[If[SquareFreeQ[n],0,1],{n,72*10^5}],{1,1,1,1,1,1,1}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 15 2017 *)
  • PARI
    {my(N=10^6, M=0, t, m2); for(m=2,sqrtint(N), t=1; m2=m^2; M=bitor(sum(i=1,N\m^2,t<<=m2),M)); for(i=1,6,M=bitand(M,M>>1)); for(i=0,N,M||break;print1(i+=t=valuation(M,2),",");M>>=t+1)} \\ Works but is much slower than the following (16s for 10^6 vs. 3s for 10^7). Should scale better (~sqrt(n) vs linear) but doesn't because of inefficient implementation of binary operations (copies & re-allocation of very large bitmaps): increasing N from 10^5 to 10^6 multiplies CPU time by a factor of 100!
    
  • PARI
    for(n=1,10^7,forstep(k=6,0,-1,issquarefree(n+k)&&(n+=k)&&next(2));print1(n",")) \\ M. F. Hasler, Feb 03 2016

Formula

A077640 = { A078144[k] | A078144[k+2] = A078144[k]+2 } = { A070284[k] | A070284[k+3] = A070284[k]+3 } etc. Note that A049535 is defined differently. - M. F. Hasler, Feb 01 2016
a(n) = A188347(n) - 3. - Amiram Eldar, Feb 09 2021

A020755 Increasing gaps between squarefree numbers (upper end).

Original entry on oeis.org

2, 5, 10, 51, 246, 849, 22026, 217077, 1092755, 8870033, 221167433, 47255689927, 82462576233, 1043460553378, 79180770078563, 3215226335143234, 23742453640900989, 125781000834058586
Offset: 1

Views

Author

Keywords

Comments

Up to n=10, a(n) is the upper end of the first gap of length n. However, for n=11 through n=16, a(n) is the upper end of the first gap of length n+1. See A020753. - M. F. Hasler, Dec 28 2015

Examples

			The first gap in A005117 occurs between 1 and 2 and has length 1. The next largest gap occurs between 3 and 5 and has length 2. The next largest gap is between 7 and 10 and has length 3. Etc. We are only interested in gaps that set new records.
		

Crossrefs

Programs

  • PARI
    A020755(n)=for(k=L=1,oo,issquarefree(k)||next;k-L>=n&&return(k);L=k) \\ M. F. Hasler, Dec 28 2015

Formula

a(n) = A020754(n) + A020753(n). - M. F. Hasler, Dec 28 2015

Extensions

Thanks to Christian Bower for additional comments.
More terms (computed using data from A020754) added by M. F. Hasler, Dec 28 2015
Showing 1-10 of 16 results. Next