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-18 of 18 results.

A076260 a(n) = 0 if n is a squarefree number, otherwise the distance between the two nearest squarefree numbers around n: A067535(n)-A070321(n).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 03 2002

Keywords

Comments

a(n)=0 iff n is squarefree; otherwise a(n) > 1.

Examples

			The nearest squarefree numbers surrounding 25 = 5^2 are A070321(25) = 23 and A067535(25) = 26, therefore a(25) = 26-23 = 3. - Edited by _Antti Karttunen_, Nov 23 2017
		

Crossrefs

Programs

  • Mathematica
    Block[{nn = 105, s}, s = Select[Range[nn + 15], SquareFreeQ]; Array[If[FreeQ[s, #], First@ Differences@ s[[# - 1 ;; #]] &@ FirstPosition[Union@ Append[s, #], #][[1]], 0] &, 105]] (* Michael De Vlieger, Nov 23 2017 *)
  • PARI
    A067535(n) = { while(!issquarefree(n), n++); n; } \\ These two functions from Michel Marcus, Mar 18 2017
    A070321(n) = { while(!issquarefree(n), n--); n; }
    A076260(n) = (A067535(n)-A070321(n)); \\ Antti Karttunen, Nov 22 2017

Extensions

Definition corrected to match with the data as the old definition was that of A080733 - Antti Karttunen, Nov 23 2017

A109473 Let m = n-th squarefree number = A005117(n), and consider the smallest pair of consecutive squarefree numbers (r,s) with gcd(r,s) = m; sequence gives values of r.

Original entry on oeis.org

1, 422, 174, 22830, 9216772051242, 234374
Offset: 1

Views

Author

N. J. A. Sloane, based on a suggestion from David W. Wilson, Aug 20 2005

Keywords

Comments

a(7) is the first unknown value.
If m (in the table in Examples) is odd then a(m) >= A020754(m-1). If m is even then a(m) >= A020754(2m-1). - Jud McCranie, Sep 30 2020
a(12) (for m=17) is greater than 3.3*10^16. - Jud McCranie, Oct 16 2020

Examples

			n  |  m |    a(n) = r
---+----+---------------
1  |  1 |              1
2  |  2 |            422
3  |  3 |            174
4  |  5 |          22830
5  |  6 |  9216772051242
6  |  7 |         234374
7  | 10 |              ?
8  | 11 |    21971536246
9  | 13 |  8678016978774
10 | 14 |              ?
11 | 15 | 36442589727570
Specifically, 174 is squarefree, 177 is the next squarefree integer, and gcd(174,177) = 3; this is the first pair of consecutive squarefree numbers whose GCD is 3, so a(3)=174. - _Jud McCranie_, Nov 25 2019
		

Crossrefs

See A109505 for another version. Cf. A005117, A051681, A020754, A337914, A337915.

Extensions

a(5) from Jud McCranie, Aug 28 2005
a(8) from Jud McCranie, Aug 29 2005 (see Examples)
a(9) from Jud McCranie, Aug 31 2005 (see Examples)
Don Reble pointed out that the value of a(5), 9216772051254, given in the DATA section should have been 9216772051242, as in the EXAMPLE section. Revised definition to clarify the difference between n and m. - N. J. A. Sloane, Nov 25 2019
a(11) from Jud McCranie, Sep 30 2020 (see Examples)

A109505 Consider the smallest pair of consecutive squarefree numbers (r,s) with gcd(r,s) = n; sequence gives values of r, or -1 if n is not squarefree.

Original entry on oeis.org

1, 422, 174, -1, 22830, 9216772051242, 234374, -1, -1
Offset: 1

Views

Author

N. J. A. Sloane, Aug 31 2005

Keywords

Comments

a(10) <= 462850319999160398264270. - David A. Corneth, Sep 19 2020
If n is odd then a(n) >= A020754(n-1). If n is even then a(n) >= A020754(2n-1). - Jud McCranie, Sep 30 2020

Examples

			174 is squarefree, 177 is the next squarefree integer, and gcd(174,177) = 3; this is the first pair of consecutive squarefree numbers whose GCD is 3, so a(3)=174. - _Jud McCranie_, Nov 25 2019
		

Crossrefs

See A109473, the main entry for this sequence, for more information.

Extensions

a(6) corrected by Don Reble. - N. J. A. Sloane, Nov 25 2019

A079229 Least k>0 such that rad(n+k) > rad(n), where rad is the squarefree kernel (A007947).

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 2, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 4, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 02 2003

Keywords

Comments

A020754 probably gives the records in this sequence. - Charles R Greathouse IV, Aug 02 2013

Crossrefs

a(n) = A079228(n) - n.

Programs

  • Haskell
    a079229 n = a079229_list !! (n-1)
    a079229_list = f a007947_list where
       f (x:xs) = ((+ 1) . length $ takeWhile (<= x) xs) : f xs
    -- Reinhard Zumkeller, Oct 06 2012
    
  • Mathematica
    rad[n_] := Times @@ FactorInteger[n][[All, 1]]; a[1] = 1; a[n_] := For[k = 1, True, k++, If[ rad[n+k] > rad[n], Return[k]]]; Table[ a[n], {n, 1, 105}] (* Jean-François Alcover, Oct 05 2012 *)
  • PARI
    rad(n)=my(f=factor(n)[,1]);prod(i=1,#f,f[i])
    a(n)=my(r=rad(n),k);while(r>=rad(n+k++),);k \\ Charles R Greathouse IV, Aug 02 2013

A349230 Numbers k such that k and k+3 are consecutive squarefree numbers.

Original entry on oeis.org

7, 23, 26, 43, 62, 74, 79, 115, 119, 134, 146, 151, 167, 170, 174, 187, 206, 223, 259, 274, 278, 287, 295, 314, 323, 331, 359, 362, 367, 374, 386, 403, 439, 458, 494, 506, 511, 523, 527, 530, 538, 566, 574, 583, 619, 623, 635, 638, 655, 674, 691, 710, 727, 734
Offset: 1

Views

Author

Amiram Eldar, Nov 11 2021

Keywords

Comments

The asymptotic density of this sequence is 0.0716601371276261... (Mossinghoff et al., 2021).

Examples

			7 is a term since 7 and 7 + 3 = 10 = 2*5 are squarefree, and 7 + 1 = 8 = 2^3 and 7 + 2 = 9 = 3^2 are not.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[750], Boole[SquareFreeQ /@ (# + {0, 1, 2, 3})] == {1, 0, 0, 1} &]
  • PARI
    isok(k) = issquarefree(k) && !issquarefree(k+1) && !issquarefree(k+2) && issquarefree(k+3); \\ Michel Marcus, Nov 11 2021

A349231 Numbers k such that k and k+4 are consecutive squarefree numbers.

Original entry on oeis.org

47, 97, 123, 341, 349, 422, 474, 547, 602, 723, 773, 1023, 1249, 1273, 1322, 1374, 1419, 1447, 1518, 1663, 1673, 1847, 1861, 1923, 2006, 2022, 2055, 2105, 2149, 2222, 2274, 2347, 2365, 2522, 2526, 2573, 2643, 2823, 2870, 3049, 3122, 3183, 3210, 3247, 3282, 3427
Offset: 1

Views

Author

Amiram Eldar, Nov 11 2021

Keywords

Comments

The asymptotic density of this sequence is 0.0149788175410999... (Mossinghoff et al., 2021).

Examples

			47 is a term since 47 and 47 + 4 = 51 = 3*17 are squarefree, and 47 + 1 = 48 = 2^4*3, 47 + 2 = 49 = 7^2 and 47 + 3 = 50 = 2*5^2 are not.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[3500], Boole[SquareFreeQ /@ (# + Range[0, 4])] == {1, 0, 0, 0, 1} &]

A376164 Maximum of the n-th maximal run of nonsquarefree numbers (increasing by 1 at a time).

Original entry on oeis.org

4, 9, 12, 16, 18, 20, 25, 28, 32, 36, 40, 45, 50, 52, 54, 56, 60, 64, 68, 72, 76, 81, 84, 88, 90, 92, 96, 100, 104, 108, 112, 117, 121, 126, 128, 132, 136, 140, 144, 148, 150, 153, 156, 160, 162, 164, 169, 172, 176, 180, 184, 189, 192, 196, 198, 200, 204, 208
Offset: 1

Views

Author

Gus Wiseman, Sep 15 2024

Keywords

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
		

Crossrefs

For length instead of maximum we have A053797 (firsts A373199).
For lengths of anti-runs we have A373409 (firsts A373573).
For sum instead of maximum we have A373414, anti A373412.
For minimum instead of maximum we have A053806, anti A373410.
For anti-runs instead of runs we have A068781.
For squarefree instead of nonsquarefree we have A373415, anti A007674.
For nonprime instead of nonsquarefree we have A006093 with 2 removed.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147, sums A329472.
A061398 counts squarefree numbers between primes, nonsquarefree A061399.
A120992 gives squarefree run-lengths, anti A373127 (firsts A373128).
A373413 adds up each maximal run of squarefree numbers, min A072284.
A375707 counts squarefree numbers between consecutive nonsquarefree numbers.

Programs

  • Mathematica
    Max/@Split[Select[Range[100],!SquareFreeQ[#]&],#1+1==#2&]//Most

A278554 Number of distinct blocks of length n (a.k.a. subword complexity) of the characteristic sequence of the squarefree numbers A008966.

Original entry on oeis.org

1, 2, 4, 8, 15, 29, 55, 101, 175, 323, 583
Offset: 0

Views

Author

Jeffrey Shallit, Jan 02 2017

Keywords

Comments

Conjecture 1: this is the number of binary sequences S of length n such that, for all primes p such that p^2 <= n, at least one of the p^2 linearly indexed subsequences of S with gap p^2 starting at the 1st, 2nd, ..., p^2-th position of S, is the all-zeros sequence. In other words, every block that is not explicitly ruled out by congruence conditions for the primes p with p^2 <= n should occur.
Conjecture 2: the last new block to actually occur is always 0^n (n copies of 0). Cf. A020754.

Examples

			For n = 5, the 3 blocks of length 5 that do not occur are 11111, 11110, and 01111.
		

Crossrefs

Previous Showing 11-18 of 18 results.