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

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

A221865 The nonprimes k such that k + 2 is either a prime or a semiprime.

Original entry on oeis.org

0, 1, 4, 8, 9, 12, 15, 20, 21, 24, 27, 32, 33, 35, 36, 39, 44, 45, 49, 51, 55, 56, 57, 60, 63, 65, 69, 72, 75, 77, 80, 81, 84, 85, 87, 91, 92, 93, 95, 99, 104, 105, 111, 116, 117, 119, 120, 121, 125, 129, 132, 135, 140, 141, 143, 144, 147, 153, 155, 156, 159, 161, 164, 165, 171, 175, 176, 177, 183
Offset: 1

Views

Author

Gerasimov Sergey, Apr 18 2013

Keywords

Comments

Chen primes A109611(n) such that A109611(n)-/+ a(n) are both prime: 2, 29, 53, 113, 139,...
Unrelated: Numbers n such that n + 2^bigomega(n) is either a prime or a semiprime: 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 15, 17, 18, 19, 21, 22, 23, 25, 27,...
A179384 is a subsequence. - R. J. Mathar, Apr 26 2013

Crossrefs

Programs

  • Maple
    A221865 := proc(n)
        option remember;
        if n =1 then
            0;
        else
            for a from procname(n-1)+1 do
                if not isprime(a) then
                if isprime(a+2) or numtheory[bigomega](a+2) = 2 then
                    return a;
                end if;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Apr 26 2013
  • Mathematica
    Select[Range[0,200],!PrimeQ[#]&&PrimeOmega[#+2]<3&] (* Harvey P. Dale, May 05 2013 *)

Extensions

Corrected by R. J. Mathar, Apr 26 2013
Showing 1-2 of 2 results.