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 51 results. Next

A378085 First differences of A070321 (greatest squarefree number <= n).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 04 2024

Keywords

Examples

			The greatest squarefree number <= 50 is 47, and the greatest squarefree number <= 51 is 51, so a(51) = 4.
		

Crossrefs

Ones are A007674.
Zeros are A013929 - 1.
Twos are A280892.
Positions of first appearances are A020755 - 1 (except first term).
First-differences of A070321.
The nonsquarefree restriction is A378034, differences of A378032.
For nonsquarefree numbers we have A378036, differences of A378033.
The opposite restriction to primes is A378037, differences of A112926.
The restriction to primes is A378038, differences of A112925.
The nonsquarefree opposite is A378039, restriction A377784.
The opposite version is A378087.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.

Programs

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

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

A112925 Largest squarefree integer < the n-th prime.

Original entry on oeis.org

1, 2, 3, 6, 10, 11, 15, 17, 22, 26, 30, 35, 39, 42, 46, 51, 58, 59, 66, 70, 71, 78, 82, 87, 95, 97, 102, 106, 107, 111, 123, 130, 134, 138, 146, 149, 155, 161, 166, 170, 178, 179, 190, 191, 195, 197, 210, 222, 226, 227, 231, 238, 239, 249, 255, 262, 267, 269, 274, 278
Offset: 1

Views

Author

Leroy Quet, Oct 06 2005

Keywords

Examples

			6 is the largest squarefree less than the 4th prime, 7. So a(4) = 6.
		

Crossrefs

For prime powers instead of squarefree numbers we have A065514, opposite A345531.
Restriction of A070321 (differences A378085) to the primes; see A378619.
The opposite is A112926, differences A378037.
Subtracting each term from prime(n) gives A240473, opposite A240474.
For nonsquarefree numbers we have A378033, differences A378036, see A378034, A378032.
For perfect powers we have A378035.
First differences are A378038.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013928 counts squarefree numbers up to n - 1.
A013929 lists the nonsquarefree numbers, differences A078147.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.
A112929 counts squarefree numbers up to prime(n).

Programs

  • Maple
    with(numtheory): a:=proc(n) local p,B,j: p:=ithprime(n): B:={}: for j from 1 to p-1 do if abs(mobius(j))>0 then B:=B union {j} else B:=B fi od: B[nops(B)] end: seq(a(m),m=1..75); # Emeric Deutsch, Oct 14 2005
  • Mathematica
    With[{k = 120}, Table[SelectFirst[Range[Prime@ n - 1, Prime@ n - Min[Prime@ n - 1, k], -1], SquareFreeQ], {n, 60}]] (* Michael De Vlieger, Aug 16 2017 *)
  • PARI
    a(n,p=prime(n))=while(!issquarefree(p--),); p \\ Charles R Greathouse IV, Aug 16 2017

Formula

a(n) = prime(n) - A240473(n). - Gus Wiseman, Jan 10 2025

Extensions

More terms from Emeric Deutsch, Oct 14 2005

A112926 Smallest squarefree integer > the n-th prime.

Original entry on oeis.org

3, 5, 6, 10, 13, 14, 19, 21, 26, 30, 33, 38, 42, 46, 51, 55, 61, 62, 69, 73, 74, 82, 85, 91, 101, 102, 105, 109, 110, 114, 129, 133, 138, 141, 151, 154, 158, 165, 170, 174, 181, 182, 193, 194, 199, 201, 213, 226, 229, 230, 235, 241, 246, 253, 258, 265, 271, 273
Offset: 1

Views

Author

Leroy Quet, Oct 06 2005

Keywords

Examples

			10 is the smallest squarefree number greater than the 4th prime, 7. So a(4) = 10.
From _Gus Wiseman_, Dec 07 2024: (Start)
The first number line below shows the squarefree numbers. The second shows the primes:
--1--2--3-----5--6--7-------10-11----13-14-15----17----19----21-22-23-------26--
=====2==3=====5=====7==========11====13==========17====19==========23===========
(End)
		

Crossrefs

Restriction of A067535, differences A378087.
The unrestricted opposite is A070321, differences A378085.
The opposite is A112925, differences A378038.
Subtracting prime(n) from each term gives A240474, opposite A240473.
For nonsquarefree we have A377783, restriction of A120327.
The nonsquarefree differences are A377784, restriction of A378039.
First differences are A378037.
For perfect power we have A378249, A378617, A378250, A378251.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.

Programs

  • Maple
    with(numtheory): a:=proc(n) local p,B,j: p:=ithprime(n): B:={}: for j from p+1 to p+20 do if abs(mobius(j))>0 then B:=B union {j} else B:=B fi od: B[1] end: seq(a(m),m=1..75); # Emeric Deutsch, Oct 10 2005
  • Mathematica
    Do[k = Prime[n] + 1; While[ !SquareFreeQ[k], k++ ]; Print[k], {n, 1, 100}] (* Ryan Propper, Oct 10 2005 *)
    With[{k = 120}, Table[SelectFirst[Range[Prime@ n + 1, Prime@ n + k], SquareFreeQ], {n, 58}]] (* Michael De Vlieger, Aug 16 2017 *)
  • PARI
    a(n,p=prime(n))=while(!issquarefree(p++),); p \\ Charles R Greathouse IV, Aug 16 2017

Formula

a(n) = prime(n) + A240474(n). - Gus Wiseman, Dec 07 2024

Extensions

More terms from Ryan Propper and Emeric Deutsch, Oct 10 2005

A061399 Number of nonsquarefree integers between primes prime(n) and prime(n+1).

Original entry on oeis.org

0, 1, 0, 2, 1, 1, 1, 1, 4, 0, 2, 1, 0, 2, 4, 2, 1, 2, 1, 1, 2, 2, 2, 3, 3, 0, 1, 1, 1, 7, 1, 3, 0, 4, 1, 3, 2, 1, 4, 2, 1, 3, 1, 1, 1, 4, 3, 2, 1, 1, 2, 1, 6, 2, 2, 2, 1, 3, 2, 0, 4, 6, 1, 1, 2, 4, 3, 5, 1, 3, 1, 4, 3, 3, 1, 3, 2, 1, 3, 3, 1, 4, 1, 1, 2, 2, 3, 2, 0, 1, 5, 3, 2, 3, 1, 3, 4, 1, 9, 1, 5, 2, 3, 0, 3
Offset: 1

Views

Author

Labos Elemer, Jun 07 2001

Keywords

Examples

			Between 113 and 127 the 7 numbers which are not squarefree are {116,117,120,121,124,125,126}, so a(30)=7.
From _Gus Wiseman_, Dec 07 2024: (Start)
The a(n) nonsquarefree numbers for n = 1..15:
   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
  ----------------------------------------------------------
   .   4   .   8  12  16  18  20  24   .  32  40   .  44  48
               9                  25      36          45  49
                                  27                      50
                                  28                      52
(End)
		

Crossrefs

Zeros are A068361.
First differences of A378086, restriction of A057627 to the primes.
Other classes (instead of nonsquarefree):
- For composite we have A046933, first differences of A065890.
- For squarefree see A061398, A068360, A071403, A373197, A373198, A377431.
- For prime power we have A080101.
- For non prime power we have A368748, see A378616.
- For perfect power we have A377432, zeros A377436.
- For non perfect power we have A377433, A029707.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147.
A120327 gives the least nonsquarefree number >= n.

Programs

A065514 Largest power of a prime < prime(n).

Original entry on oeis.org

1, 2, 4, 5, 9, 11, 16, 17, 19, 27, 29, 32, 37, 41, 43, 49, 53, 59, 64, 67, 71, 73, 81, 83, 89, 97, 101, 103, 107, 109, 125, 128, 131, 137, 139, 149, 151, 157, 163, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 243, 256, 257, 263, 269, 271
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 27 2001

Keywords

Crossrefs

Starting with n instead of prime(n) gives A031218 (A377282, A377782).
The squarefree version is A112925 (A070321, A378038).
The opposite squarefree version is A112926 (A378037, restriction of A067535).
Difference from prime(n) is A377289 (restriction of A276781, opposite A377281).
First differences are A377781.
The nonsquarefree version is A378032 (A377783 (restriction of A378033), A378034, A378040).
The perfect power version is A378035.
A000015 gives the least prime power >= n, differences A377780.
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
A345531 gives the least prime power > prime(n), differences A377703.
Prime powers between primes: A053607, A080101, A304521, A366833, A377057, A377286.

Programs

  • Mathematica
    lpp[n_]:=Module[{k=n-1},While[!PrimePowerQ[k],k--];k]; Join[{1},Table[ lpp[ n],{n,Prime[Range[2,60]]}]] (* Harvey P. Dale, Nov 24 2018 *)
  • Python
    from sympy import factorint, prime
    def A065514(n): return next(filter(lambda m:len(factorint(m))<=1, range(prime(n)-1,0,-1))) # Chai Wah Wu, Oct 25 2024

Extensions

Name edited (1 is technically not a prime power even though it is a power of a prime) by Gus Wiseman, Dec 03 2024.

A120327 Smallest nonsquarefree number >= n.

Original entry on oeis.org

4, 4, 4, 4, 8, 8, 8, 8, 9, 12, 12, 12, 16, 16, 16, 16, 18, 18, 20, 20, 24, 24, 24, 24, 25, 27, 27, 28, 32, 32, 32, 32, 36, 36, 36, 36, 40, 40, 40, 40, 44, 44, 44, 44, 45, 48, 48, 48, 49, 50, 52, 52, 54, 54, 56, 56, 60, 60, 60, 60, 63, 63, 63, 64, 68, 68, 68, 68, 72, 72, 72, 72
Offset: 1

Views

Author

Zak Seidov, Aug 16 2006

Keywords

Crossrefs

For squarefree instead of nonsquarefree we have A067535, differences A378087.
The opposite for squarefree is A070321, differences A378085.
The run-lengths are A078147 if we prepend 4, differences A376593.
The restriction to primes is A377783 (union A378040), differences A377784.
The opposite is A378033 (differences A378036), for prime powers A031218.
First differences are A378039 if we assume that a(1) = 1.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.

Programs

  • Mathematica
    Table[NestWhile[ #+1&,n,SquareFreeQ],{n,100}] (* simplified by Harvey P. Dale, Apr 08 2014 *)

A067535 Smallest squarefree number >= n.

Original entry on oeis.org

1, 2, 3, 5, 5, 6, 7, 10, 10, 10, 11, 13, 13, 14, 15, 17, 17, 19, 19, 21, 21, 22, 23, 26, 26, 26, 29, 29, 29, 30, 31, 33, 33, 34, 35, 37, 37, 38, 39, 41, 41, 42, 43, 46, 46, 46, 47, 51, 51, 51, 51, 53, 53, 55, 55, 57, 57, 58, 59, 61, 61, 62
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 27 2002

Keywords

Crossrefs

Programs

  • Maple
    A067535 := proc(n)
        for a from n do
            if issqrfree(a) then
                return a ;
            end if;
        end do:
    end proc:
    seq(A067535(n),n=1..100) ; # R. J. Mathar, May 31 2024
  • Mathematica
    Table[k = n; While[! SquareFreeQ@ k, k++]; k, {n, 62}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    a(n) = while (! issquarefree(n), n++); n; \\ Michel Marcus, Mar 18 2017
    
  • Python
    from itertools import count
    from sympy import factorint
    def A067535(n): return next(m for m in count(n) if max(factorint(m).values(),default=0)<=1) # Chai Wah Wu, Dec 04 2024

Formula

a(n) = n + A081221(n). - Amiram Eldar, Oct 10 2023

A068361 Numbers n such that the number of squarefree numbers between prime(n) and prime(n+1) = prime(n+1)-prime(n)-1.

Original entry on oeis.org

1, 3, 10, 13, 26, 33, 60, 89, 104, 113, 116, 142, 148, 201, 209, 212, 234, 265, 268, 288, 313, 320, 332, 343, 353, 384, 398, 408, 477, 484, 498, 542, 545, 551, 577, 581, 601, 625, 636, 671, 719, 723, 726, 745, 794, 805, 815, 862, 864, 884, 944, 964, 995, 1054
Offset: 1

Views

Author

Benoit Cloitre, Feb 28 2002

Keywords

Comments

Also numbers k such that all numbers from prime(k) to prime(k+1) are squarefree. All such primes are twins, so this is a subset of A029707. The other twin primes are A061368. - Gus Wiseman, Dec 11 2024

Crossrefs

A subset of A029707 (lesser index of twin primes).
Prime index of each (prime) term of A061351.
Positions of zeros in A061399.
For perfect power instead of squarefree we have A377436, zeros of A377432.
Positions of zeros in A377784.
The rest of the twin primes are at A378620, indices of A061368.
A000040 lists the primes, differences A001223, (run-lengths A333254, A373821).
A005117 lists the squarefree numbers, differences A076259.
A006562 finds balanced primes.
A013929 lists the nonsquarefree numbers, differences A078147.
A014574 is the intersection of A006093 and A008864.
A038664 locates the first prime gap of size 2n.
A046933 counts composite numbers between primes.
A061398 counts squarefree numbers between primes, zeros A068360.
A120327 gives the least nonsquarefree number >= n.

Programs

  • Mathematica
    Select[Range[100],And@@SquareFreeQ/@Range[Prime[#],Prime[#+1]]&] (* Gus Wiseman, Dec 11 2024 *)
  • PARI
    isok(n) = for (k=prime(n)+1, prime(n+1)-1, if (!issquarefree(k), return (0))); 1; \\ Michel Marcus, Apr 29 2016

Formula

n such that A061398(n) = prime(n+1)-prime(n)-1.
prime(a(n)) = A061351(n). - Gus Wiseman, Dec 11 2024

A378033 Greatest nonsquarefree number <= n, or 1 if there is none (the case n <= 3).

Original entry on oeis.org

1, 1, 1, 4, 4, 4, 4, 8, 9, 9, 9, 12, 12, 12, 12, 16, 16, 18, 18, 20, 20, 20, 20, 24, 25, 25, 27, 28, 28, 28, 28, 32, 32, 32, 32, 36, 36, 36, 36, 40, 40, 40, 40, 44, 45, 45, 45, 48, 49, 50, 50, 52, 52, 54, 54, 56, 56, 56, 56, 60, 60, 60, 63, 64, 64, 64, 64, 68
Offset: 1

Views

Author

Gus Wiseman, Nov 18 2024

Keywords

Examples

			The nonsquarefree numbers <= 10 are {4, 8, 9}, so a(10) = 9.
		

Crossrefs

For prime-powers we have A031218, differences A377782.
Greatest of the nonsquarefree numbers counted by A057627.
The opposite for squarefree is A067535, differences A378087.
For squarefree we have A070321, differences A378085.
The opposite is A120327 (union A162966), differences A378039.
The restriction to the primes is A378032, opposite A377783 (union A378040).
First-differences are A378036, restriction A378034.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259, seconds A376590.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes (sums A337030), zeros A068360.
A061399 counts nonsquarefree numbers between primes (sums A378086), zeros A068361.
A112925 gives the greatest squarefree number < prime(n), differences A378038.
A112926 gives the least squarefree number > prime(n), differences A378037.
A377046 encodes k-differences of nonsquarefree numbers, zeros A377050.

Programs

  • Mathematica
    Table[NestWhile[#-1&,n,#>1&&SquareFreeQ[#]&],{n,100}]
  • PARI
    a(n) = my(k=n); while (issquarefree(k), k--); if(!k, 1, k); \\ Michel Marcus, Jul 26 2025

Formula

a(prime(n)) = A378032(n).
a(n) = A013929(A057627(n)), for n > 3. - Ridouane Oudra, Jul 26 2025
Showing 1-10 of 51 results. Next