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

A377784 First-differences of A377783 (least nonsquarefree number > prime(n)).

Original entry on oeis.org

0, 4, 0, 4, 4, 2, 2, 4, 8, 0, 8, 4, 0, 4, 6, 6, 3, 5, 4, 3, 5, 4, 6, 8, 6, 0, 4, 4, 4, 12, 4, 8, 0, 10, 2, 8, 4, 4, 7, 5, 4, 8, 4, 2, 2, 12, 12, 4, 4, 2, 6, 2, 10, 8, 4, 6, 2, 7, 5, 0, 10, 14, 4, 3, 5, 12, 6, 10, 2, 6, 4, 8, 7, 5, 4, 8, 8, 4, 8, 8, 3, 9, 4, 4
Offset: 1

Views

Author

Gus Wiseman, Nov 18 2024

Keywords

Comments

There are no consecutive 0's.
Does this sequence contain every positive integer > 1?

Crossrefs

Positions of 0's are A068361.
The opposite for squarefree is A378038, differences of A112925.
For prime-power instead of nonsquarefree and primes + 1 we have A377703, first-differences of A345531.
First-differences of A377783, union A378040.
The opposite is A378034 (differences of A378032), restriction of A378036 (differences A378033).
For squarefree instead of nonsquarefree we have A378037, first-differences of A112926.
Restriction of A378039 (first-differences of A120327) to the primes.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398, A068360, A337030, A377430, A377431 count squarefree numbers between primes.
A061399, A068361, A378086 count nonsquarefree numbers between primes.
A070321 gives the greatest squarefree number up to n.

Programs

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

A378040 Union of A377783(n) = least nonsquarefree number > prime(n).

Original entry on oeis.org

4, 8, 12, 16, 18, 20, 24, 32, 40, 44, 48, 54, 60, 63, 68, 72, 75, 80, 84, 90, 98, 104, 108, 112, 116, 128, 132, 140, 150, 152, 160, 164, 168, 175, 180, 184, 192, 196, 198, 200, 212, 224, 228, 232, 234, 240, 242, 252, 260, 264, 270, 272, 279, 284, 294, 308, 312
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2024

Keywords

Comments

Numbers k such that, if p is the greatest prime < k, all numbers from p to k (exclusive) are squarefree.

Crossrefs

For squarefree we have A112926 (diffs A378037), opposite A112925 (diffs A378038).
For prime-power instead of nonsquarefree we have A345531, differences A377703.
Union of A377783 (diffs A377784), restriction of A120327 (diffs A378039).
Nonsquarefree numbers not appearing are A378084, see also A378082, A378083.
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.
A070321 gives the greatest squarefree number up to n.
A071403(n) = A013928(prime(n)) counts squarefree numbers up to prime(n).
A378086(n) = A057627(prime(n)) counts nonsquarefree numbers up to prime(n).
Cf. A378034 (differences of A378032), restriction of A378036 (differences A378033).

Programs

  • Mathematica
    Union[Table[NestWhile[#+1&,Prime[n],SquareFreeQ],{n,100}]]
    lns[p_]:=Module[{k=p+1},While[SquareFreeQ[k],k++];k]; Table[lns[p],{p,Prime[Range[70]]}]//Union (* Harvey P. Dale, Jun 12 2025 *)

A378084 Nonsquarefree numbers not appearing in A377783 (least nonsquarefree number > prime(n)).

Original entry on oeis.org

9, 25, 27, 28, 36, 45, 49, 50, 52, 56, 64, 76, 81, 88, 92, 96, 99, 100, 117, 120, 121, 124, 125, 126, 135, 136, 144, 147, 148, 153, 156, 162, 169, 171, 172, 176, 188, 189, 204, 207, 208, 216, 220, 225, 236, 243, 244, 245, 248, 250, 256, 261, 268, 275, 276, 280
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2024

Keywords

Comments

Warning: do not confuse with A377784.

Examples

			The terms together with their prime indices begin:
    9: {2,2}
   25: {3,3}
   27: {2,2,2}
   28: {1,1,4}
   36: {1,1,2,2}
   45: {2,2,3}
   49: {4,4}
   50: {1,3,3}
   52: {1,1,6}
   56: {1,1,1,4}
   64: {1,1,1,1,1,1}
   76: {1,1,8}
   81: {2,2,2,2}
   88: {1,1,1,5}
   92: {1,1,9}
   96: {1,1,1,1,1,2}
		

Crossrefs

Disjoint from A377783 (union A378040), first-differences A377784.
Appearing once: A378082.
Appearing twice: A378083.
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 (sums A337030), zeros A068360.
A061399 counts nonsquarefree numbers between primes (sums A378086), zeros A068361.
A070321 gives the greatest squarefree number up to n.
A112925 gives least squarefree number > prime(n), differences A378038.
A112926 gives greatest squarefree number < prime(n), differences A378037.
A120327 (union A162966) gives least nonsquarefree number >= n, differences A378039.
A377046 encodes k-differences of nonsquarefree numbers, zeros A377050.

Programs

  • Mathematica
    nn=100;
    y=Table[NestWhile[#+1&,Prime[n],SquareFreeQ[#]&],{n,nn}];
    Complement[Select[Range[Prime[nn]],!SquareFreeQ[#]&],y]

Formula

Complement of A378040 in A013929.

A378082 Terms appearing only once in A377783 = least nonsquarefree number > prime(n).

Original entry on oeis.org

12, 16, 18, 20, 24, 40, 48, 54, 60, 63, 68, 72, 75, 80, 84, 90, 98, 108, 112, 116, 128, 132, 150, 152, 160, 164, 168, 175, 180, 184, 192, 196, 198, 200, 212, 224, 228, 232, 234, 240, 242, 252, 260, 264, 270, 272, 279, 294, 308, 312, 315, 320, 332, 338, 348
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2024

Keywords

Comments

Nonsquarefree numbers k such that if p < q are the two greatest primes < k, there is at least one nonsquarefree number between p and q but all numbers between q and k are squarefree. - Robert Israel, Nov 20 2024

Examples

			The terms together with their prime indices begin:
   12: {1,1,2}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   24: {1,1,1,2}
   40: {1,1,1,3}
   48: {1,1,1,1,2}
   54: {1,2,2,2}
   60: {1,1,2,3}
   63: {2,2,4}
   68: {1,1,7}
   72: {1,1,1,2,2}
   75: {2,3,3}
   80: {1,1,1,1,3}
   84: {1,1,2,4}
   90: {1,2,2,3}
   98: {1,4,4}
  108: {1,1,2,2,2}
  112: {1,1,1,1,4}
  116: {1,1,10}
  128: {1,1,1,1,1,1,1}
  132: {1,1,2,5}
		

Crossrefs

This is a transformation of A377783 (union A378040, differences A377784).
Note also A377783 restricts A120327 (differences A378039) to the primes.
Terms appearing twice are A378083.
Terms not appearing at all are A378084.
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.
A070321 gives the greatest squarefree number up to n.
A071403(n) = A013928(prime(n)) counts squarefree numbers < prime(n).
A378086(n) = A057627(prime(n)) counts nonsquarefree numbers < prime(n).
Cf. A112926 (diffs A378037), opposite A112925 (diffs A378038).
Cf. A378032 (diffs A378034), restriction of A378033 (diffs A378036).

Programs

  • Maple
    q:= 3: R:= NULL: flag:= false: count:= 0:
    while count < 100 do
      p:= q; q:= nextprime(q);
      for k from p+1 to q-1 do
        found:= false;
        if not numtheory:-issqrfree(k) then
          if flag then
              count:= count+1; R:= R,k
          fi;
          found:= true; break
        fi;
       od;
       flag:= found;
    od:
    R; # Robert Israel, Nov 20 2024
  • Mathematica
    y=Table[NestWhile[#+1&,Prime[n],SquareFreeQ],{n,100}];
    Select[Most[Union[y]],Count[y,#]==1&]

A378083 Nonsquarefree numbers appearing exactly twice in A377783 (least nonsquarefree number > prime(n)).

Original entry on oeis.org

4, 8, 32, 44, 104, 140, 284, 464, 572, 620, 644, 824, 860, 1232, 1292, 1304, 1484, 1700, 1724, 1880, 2084, 2132, 2240, 2312, 2384, 2660, 2732, 2804, 3392, 3464, 3560, 3920, 3932, 4004, 4220, 4244, 4424, 4640, 4724, 5012, 5444, 5480, 5504, 5660, 6092, 6200
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2024

Keywords

Comments

Warning: do not confuse with A377783.

Examples

			The terms together with their prime indices begin:
     4: {1,1}
     8: {1,1,1}
    32: {1,1,1,1,1}
    44: {1,1,5}
   104: {1,1,1,6}
   140: {1,1,3,4}
   284: {1,1,20}
   464: {1,1,1,1,10}
   572: {1,1,5,6}
   620: {1,1,3,11}
   644: {1,1,4,9}
   824: {1,1,1,27}
   860: {1,1,3,14}
  1232: {1,1,1,1,4,5}
		

Crossrefs

Subset of A377783 (union A378040, diffs A377784), restriction of A120327 (diffs A378039).
Terms appearing once are A378082.
Terms not appearing at all are A378084.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.
A071403(n) = A013928(prime(n)) counts squarefree numbers < prime(n).
A378086(n) = A057627(prime(n)) counts nonsquarefree numbers < prime(n).
Cf. A112926 (diffs A378037), opposite A112925 (diffs A378038).
Cf. A378032 (diffs A378034), restriction of A378033 (diffs A378036).

Programs

  • Mathematica
    y=Table[NestWhile[#+1&,Prime[n],SquareFreeQ[#]&],{n,1000}];
    Select[Union[y],Count[y,#]==2&]

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

A070321 Greatest squarefree number <= n.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, May 11 2002

Keywords

Comments

a(n) = Max( core(k) : k=1,2,3,...,n ) where core(x) is the squarefree part of x (the smallest integer such that x*core(x) is a square).

Examples

			From _Gus Wiseman_, Dec 10 2024: (Start)
The squarefree numbers <= n are the following columns, with maxima a(n):
  1  2  3  3  5  6  7  7  7  10  11  11  13  14  15  15
     1  2  2  3  5  6  6  6  7   10  10  11  13  14  14
        1  1  2  3  5  5  5  6   7   7   10  11  13  13
              1  2  3  3  3  5   6   6   7   10  11  11
                 1  2  2  2  3   5   5   6   7   10  10
                    1  1  1  2   3   3   5   6   7   7
                             1   2   2   3   5   6   6
                                 1   1   2   3   5   5
                                         1   2   3   3
                                             1   2   2
                                                 1   1
(End)
		

Crossrefs

The distinct terms are A005117 (the squarefree numbers).
The opposite version is A067535, differences A378087.
The run-lengths are A076259.
Restriction to the primes is A112925; see A378038, A112926, A378037.
For nonsquarefree we have A378033; see A120327, A378036, A378032, A377783.
First differences are A378085.
Subtracting each term from n gives A378619.
A013929 lists the nonsquarefree numbers, differences A078147.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.

Programs

  • Maple
    A070321 := proc(n)
        local a;
        for a from n by -1 do
            if issqrfree(a) then
                return a;
            end if;
        end do:
    end proc:
    seq(A070321(n),n=1..100) ; # R. J. Mathar, May 25 2023
  • Mathematica
    a[n_] :=For[ k = n, True, k--, If[ SquareFreeQ[k], Return[k]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 27 2013 *)
    gsfn[n_]:=Module[{k=n},While[!SquareFreeQ[k],k--];k]; Array[gsfn,80] (* Harvey P. Dale, Mar 27 2013 *)
  • PARI
    a(n) = while (! issquarefree(n), n--); n; \\ Michel Marcus, Mar 18 2017
    
  • Python
    from itertools import count
    from sympy import factorint
    def A070321(n): return next(m for m in count(n,-1) if max(factorint(m).values(),default=0)<=1) # Chai Wah Wu, Dec 04 2024

Formula

a(n) = n - o(n^(1/5)) by a result of Pandey. - Charles R Greathouse IV, Dec 04 2024
a(n) = A005117(A013928(n+1)). - Ridouane Oudra, Jul 26 2025

Extensions

New description from Reinhard Zumkeller, Oct 03 2002

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.
Showing 1-10 of 25 results. Next