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.

A378458 Squarefree numbers k such that k + 1 is squarefree but k + 2 is not.

Original entry on oeis.org

2, 6, 10, 14, 22, 30, 34, 38, 42, 46, 58, 61, 66, 70, 73, 78, 82, 86, 94, 102, 106, 110, 114, 118, 122, 130, 133, 138, 142, 145, 154, 158, 166, 173, 178, 182, 186, 190, 194, 202, 205, 210, 214, 218, 222, 226, 230, 238, 246, 254, 258, 262, 266, 273, 277, 282
Offset: 1

Views

Author

Gus Wiseman, Dec 02 2024

Keywords

Comments

These are the positions of 2 in A378369 (difference between n and the next nonsquarefree number).
The asymptotic density of this sequence is Product_{p prime} (1 - 2/p^2) - Product_{p prime} (1 - 3/p^2) = A065474 - A206256 = 0.19714711803343537224... . - Amiram Eldar, Dec 03 2024

Crossrefs

Complement of A007675 within A007674.
The version for prime power instead of nonsquarefree is a subset of A006549.
Another variation is A073247.
The version for nonprime instead of squarefree is A179384.
Positions of 0 in A378369 are A013929.
Positions of 1 in A378369 are A373415.
Positions of 2 in A378369 are A378458 (this).
Positions of 3 in A378369 are A007675.
A000961 lists the powers of primes, differences A057820.
A120327 gives the least nonsquarefree number >= n.
A378373 counts composite numbers between nonsquarefree numbers.

Programs

  • Mathematica
    Select[Range[100],NestWhile[#+1&,#,SquareFreeQ[#]&]==#+2&]
  • PARI
    list(lim) = my(q1 = 1, q2 = 1, q3); for(k = 3, lim, q3 = issquarefree(k); if(q1 && q2 &&!q3, print1(k-2, ", ")); q1 = q2; q2 = q3); \\ Amiram Eldar, Dec 03 2024