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.

A377783 Least nonsquarefree number > prime(n).

Original entry on oeis.org

4, 4, 8, 8, 12, 16, 18, 20, 24, 32, 32, 40, 44, 44, 48, 54, 60, 63, 68, 72, 75, 80, 84, 90, 98, 104, 104, 108, 112, 116, 128, 132, 140, 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
Offset: 1

Views

Author

Gus Wiseman, Nov 16 2024

Keywords

Comments

No term appears more than twice. Proof: This would require at least 4 consecutive squarefree numbers (3 primes and at least 1 squarefree number between them). But we cannot have more than 3 consecutive squarefree numbers, because otherwise one of them must be divisible by 4, hence not squarefree.

Examples

			The third prime is 5, which is followed by 6, 7, 8, 9, ..., of which 8 is the first nonsquarefree term, so a(3) = 8.
The terms together with their prime indices begin:
    4: {1,1}
    4: {1,1}
    8: {1,1,1}
    8: {1,1,1}
   12: {1,1,2}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   24: {1,1,1,2}
   32: {1,1,1,1,1}
   32: {1,1,1,1,1}
   40: {1,1,1,3}
   44: {1,1,5}
   44: {1,1,5}
   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}
		

Crossrefs

For squarefree we have A112926 (diffs A378037), opposite A112925 (diffs A378038).
Restriction to the primes of A120327, which has first differences A378039.
For prime-power instead of nonsquarefree (and primes + 1) we have A345531.
First differences are A377784.
The opposite is A378032 (diffs A378034), restriction of A378033 (diffs A378036).
The union is A378040.
Terms appearing only once are A378082.
Terms appearing twice are A378083.
Nonsquarefree numbers that are missing 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.

Programs

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

Formula

a(n) = A120327(prime(n)).

Extensions

Proof suggested by Amiram Eldar.