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

A075432 Primes with no squarefree neighbors.

Original entry on oeis.org

17, 19, 53, 89, 97, 127, 149, 151, 163, 197, 199, 233, 241, 251, 269, 271, 293, 307, 337, 349, 379, 449, 487, 491, 521, 523, 557, 577, 593, 631, 701, 727, 739, 751, 773, 809, 811, 881, 883, 919, 953, 991, 1013, 1049, 1051, 1061, 1063, 1097, 1151, 1171, 1249
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 15 2002

Keywords

Comments

Complement of A075430 in A000040.
From Ludovicus (luiroto(AT)yahoo.com), Dec 07 2009: (Start)
I propose a shorter name: non-Euclidean primes. That is justified by the Euclid's demonstration of the infinitude of primes. It appears that the proportion of non-Euclidean primes respect to primes tend to the limit 1-2A where A = 0.37395581... is Artin's constant. This table calculated by Jens K. Andersen corroborates it:
10^5: 2421 / 9592 = 0.2523978315
10^6: 19812 / 78498 = 0.2523885958
10^7: 167489 / 664579 = 0.2520227091
10^8: 1452678 / 5761455 = 0.2521373507
10^9: 12817966 / 50847534 = 0.2520862860
10^10: 114713084 / 455052511 = 0.2520875750
10^11: 1038117249 / 4118054813 = 0.2520892256
It comes close to the expected 1-2A. (End)
This sequence is infinite by Dirichlet's theorem, since there are infinitely many primes == 17 or 19 (mod 36) and these have no squarefree neighbors. Ludovicus's conjecture about density is correct. Capsule proof: either p-1 or p+1 is divisible by 4, so it suffices to consider the other number (without loss of generality, p+1). For some fixed bound L, p is not divisible by any prime q < L (with finitely many exceptions) so there are q^2 - q possible residue classes for p. The primes in each are uniformly distributed so the probability that p+1 is divisible by q^2 is 1/(q^2 - q). The product of the complements goes to 2A as L increases without bound, and since 2A is an upper bound the limit is sandwiched between. - Charles R Greathouse IV, Aug 27 2014
Primes p such that both p-1 and p+1 are divisible by a square greater than 1. - N. J. A. Sloane, Jul 19 2024

Examples

			p = 17 is a term because 16 = 4^2 and 18=2*3^2 are divisible by squares > 1. - _N. J. A. Sloane_, Jul 19 2024
		

Crossrefs

Intersection of A000040 and A281192.

Programs

  • Haskell
    a075432 n = a075432_list !! (n-1)
    a075432_list = f [2, 4 ..] where
       f (u:vs@(v:ws)) | a008966 v == 1 = f ws
                       | a008966 u == 1 = f vs
                       | a010051' (u + 1) == 0 = f vs
                       | otherwise            = (u + 1) : f vs
    -- Reinhard Zumkeller, May 04 2013
    
  • Maple
    filter:= n -> isprime(n) and not numtheory:-issqrfree(n+1) and not numtheory:-issqrfree(n-1):
    select(filter, [seq(2*i+1, i=1..1000)]); # Robert Israel, Aug 27 2014
  • Mathematica
    lst={}; Do[p=Prime[n]; If[ !SquareFreeQ[Floor[p-1]] && !SquareFreeQ[Floor[p+1]], AppendTo[lst,p]], {n,6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Dec 20 2008 *)
    Select[Prime[Range[300]],!SquareFreeQ[#-1]&&!SquareFreeQ[#+1]&] (* Harvey P. Dale, Apr 24 2014 *)
  • PARI
    is(n)=!issquarefree(if(n%4==1, n+1, n-1)) && isprime(n) \\ Charles R Greathouse IV, Aug 27 2014

Formula

a(n) ~ Cn log n, where C = 1/(1 - 2A) = 1/(1 - Product_{p>2 prime} (1 - 1/(p^2-p))), where A is the constant in A005596. - Charles R Greathouse IV, Aug 27 2014

Extensions

More terms (that were already in the b-file) from Jeppe Stig Nielsen, Apr 23 2020

A153213 Primes p such that both p-2 and p+2 are not squarefree.

Original entry on oeis.org

2, 47, 173, 277, 727, 839, 929, 1181, 1423, 1447, 1523, 1627, 1811, 1847, 1861, 1973, 2207, 2297, 2423, 2693, 3323, 3701, 3719, 3877, 4327, 4363, 4457, 4673, 4691, 4903, 5227, 5573, 5821, 5927, 6173, 6221, 6323, 6473, 6577, 6653, 7027, 7103, 7477, 7823
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[ !SquareFreeQ[p-2]&&!SquareFreeQ[p+2],AppendTo[lst,p]],{n,7!}];lst
  • PARI
    is(n)=isprime(n) && !issquarefree(n-2) && !issquarefree(n+2) \\ Charles R Greathouse IV, Nov 05 2017

A049098 Primes p such that p+1 is divisible by a square.

Original entry on oeis.org

3, 7, 11, 17, 19, 23, 31, 43, 47, 53, 59, 67, 71, 79, 83, 89, 97, 103, 107, 127, 131, 139, 149, 151, 163, 167, 179, 191, 197, 199, 211, 223, 227, 233, 239, 241, 251, 263, 269, 271, 283, 293, 307, 311, 331, 337, 347, 349, 359, 367, 379, 383, 419, 431, 439, 443
Offset: 1

Views

Author

Keywords

Comments

Numbers m such that A010051(m)*(1-A008966(m+1)) = 1. - Reinhard Zumkeller, May 21 2009
This sequence is infinite and its relative density in the sequence of primes is equal to 1 - Product_{p prime} (1-1/(p*(p-1))) = 1 - A005596 = 0.626044... (Mirsky, 1949). - Amiram Eldar, Feb 14 2021

Examples

			31 is a term because 32 is divisible by a square, 16.
101 is not a term because 102 = 2*3*17 is squarefree.
		

Crossrefs

Cf. A005596, A008966, A010051, A049097 (complement with respect to A000040), A160696.

Programs

  • Haskell
    a049098 n = a049098_list !! (n-1)
    a049098_list = filter ((== 0) . a008966 . (+ 1)) a000040_list
    -- Reinhard Zumkeller, Oct 18 2011
    
  • Maple
    with(numtheory): a := proc (n) if isprime(n) = true and issqrfree(n+1) = false then n else end if end proc: seq(a(n), n = 1 .. 500); # Emeric Deutsch, Jun 21 2009
  • Mathematica
    Select[Prime[Range[200]],!SquareFreeQ[#+1]&]   (* Harvey P. Dale, Mar 27 2011 *)
    Select[Prime[Range[200]], MoebiusMu[# + 1] == 0 &] (* Alonso del Arte, Oct 18 2011 *)
  • PARI
    forprime(p=2,1e4,if(!issquarefree(p+1),print1(p", "))) \\ Charles R Greathouse IV, Oct 18 2011

Formula

A160696(a(n)) > 1. - Reinhard Zumkeller, May 24 2009

A077067 Squarefree numbers of the form prime + 1.

Original entry on oeis.org

3, 6, 14, 30, 38, 42, 62, 74, 102, 110, 114, 138, 158, 174, 182, 194, 230, 258, 278, 282, 314, 318, 354, 374, 390, 398, 402, 410, 422, 434, 458, 462, 510, 542, 570, 602, 614, 618, 642, 654, 662, 674, 678, 710, 734, 758, 762, 770, 798, 822, 830, 854, 858, 878
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 23 2002

Keywords

Examples

			A005117(28) = 42 = 2*3*7 is a term as 42 = A000040(13) + 1 = 41+1.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[200]]+1,SquareFreeQ] (* Harvey P. Dale, Aug 20 2017 *)
  • PARI
    isok(n) = issquarefree(n) && isprime(n-1); \\ Michel Marcus, Mar 22 2016
    
  • PARI
    lista(nn) = forprime(p=2, nn, if (issquarefree(p+1), print1(p+1, ", "))); \\ Michel Marcus, Mar 22 2016

Formula

A077066(a(n)) = a(n).
a(n) = A049097(n)+1. - Zak Seidov, Aug 15 2006

A065301 Numbers k such that both k and the sum of its divisors are squarefree numbers.

Original entry on oeis.org

1, 2, 5, 13, 26, 29, 37, 41, 61, 73, 74, 101, 109, 113, 122, 137, 146, 157, 173, 181, 193, 218, 229, 257, 277, 281, 313, 314, 317, 353, 362, 373, 386, 389, 397, 401, 409, 421, 433, 457, 458, 461, 509, 541, 554, 569, 601, 613, 617, 626, 641, 653, 661, 673, 677
Offset: 1

Views

Author

Labos Elemer, Oct 29 2001

Keywords

Comments

From Amiram Eldar, Mar 08 2025: (Start)
Number k such that A280710(k) * A280710(A000203(k)) = 1, or equivalently, A280710(k) * A280710(A048250(k)) = 1.
Squarefree numbers k whose prime factors are terms of A049097, and the elements of the set {p+1 , p|k} are pairwise coprime. (End)

Examples

			For k = 13, sigma(13) = 14 = 2*7 is squarefree.
For k = 26, sigma(26) = 1 + 2 + 13 + 26 = 42 = 2*3*7 is squarefree.
For k = 277 (prime), sigma(277) = 278 = 2*139 is squarefree.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],AllTrue[{#,DivisorSigma[1,#]},SquareFreeQ]&] (* Harvey P. Dale, Aug 09 2014 *)
  • PARI
    is(m) = abs(moebius(m))==1 && abs(moebius(sigma(m)))==1 \\ Harry J. Smith, Oct 15 2009
    
  • Python
    from sympy import divisor_sigma
    from sympy.ntheory.factor_ import core
    def issquarefree(n): return core(n)==n
    print([n for n in range(1, 1001) if issquarefree(n) and issquarefree(divisor_sigma(n,1))]) # Indranil Ghosh, Mar 19 2017

A075430 Primes with a squarefree neighbor.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 23, 29, 31, 37, 41, 43, 47, 59, 61, 67, 71, 73, 79, 83, 101, 103, 107, 109, 113, 131, 137, 139, 157, 167, 173, 179, 181, 191, 193, 211, 223, 227, 229, 239, 257, 263, 277, 281, 283, 311, 313, 317, 331, 347, 353, 359, 367, 373, 383, 389, 397
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 15 2002

Keywords

Examples

			a(3) = 5 because 6 (the number above) is squarefree.
a(13) = 47 because 46 (the number below) is squarefree.
53 is not in the sequence because both 52 and 54 have squares among their divisors.
		

Crossrefs

Union of A039787 and A049097.
Complement of A075432 in A000040.
Cf. A005117.

Programs

  • Mathematica
    Select[Prime[Range[100]], Or @@ SquareFreeQ /@ (# + {-1, 1}) &] (* Amiram Eldar, May 07 2025 *)
  • PARI
    isok(p) = isprime(p) && (issquarefree(p-1) || issquarefree(p+1)); \\ Michel Marcus, Feb 20 2023
  • Sage
    def is_A075430(n): return is_prime(n) and (is_squarefree(n-1) or is_squarefree(n+1)) # D. S. McNeil, Jan 16 2011
    

A081083 Numbers n such that rad(n+1)=rad(n)+1, where rad(m)=A007947(m) is the squarefree kernel of m.

Original entry on oeis.org

1, 2, 5, 6, 8, 10, 13, 14, 21, 22, 29, 30, 33, 34, 37, 38, 41, 42, 46, 48, 57, 58, 61, 65, 66, 69, 70, 73, 77, 78, 82, 85, 86, 93, 94, 101, 102, 105, 106, 109, 110, 113, 114, 118, 122, 129, 130, 133, 137, 138, 141, 142, 145, 154, 157, 158, 165, 166, 173, 177, 178, 181
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 04 2003

Keywords

Comments

Nearly all terms seem to be squarefree, see A081084.

Examples

			m=46=2*23=rad(46) and rad(47)=47=46+1=rad(46)+1, therefore 46 is a term;
m=48=3*2^4, rad(48)=6 and rad(49)=rad(7*7)=7=6+1=rad(48)+1, therefore 48 is a term.
		

Crossrefs

Union of A007674 and A081084.

Programs

  • Mathematica
    rad[n_] := Times @@ (First/@ FactorInteger[n]); s = {}; r1= 1; Do[r2 = rad[n]; If[r2 == r1 +1, AppendTo[s, n-1]]; r1 = r2, {n,2, 182}]; s (* Amiram Eldar, Aug 22 2019 *)
  • PARI
    rad(n)=my(f=factor(n)[,1]);prod(i=1,#f,f[i])
    is(n)=rad(n+1)==rad(n)+1 \\ Charles R Greathouse IV, Aug 08 2013

A160696 Largest k such that k^2 divides prime(n)+1.

Original entry on oeis.org

1, 2, 1, 2, 2, 1, 3, 2, 2, 1, 4, 1, 1, 2, 4, 3, 2, 1, 2, 6, 1, 4, 2, 3, 7, 1, 2, 6, 1, 1, 8, 2, 1, 2, 5, 2, 1, 2, 2, 1, 6, 1, 8, 1, 3, 10, 2, 4, 2, 1, 3, 4, 11, 6, 1, 2, 3, 4, 1, 1, 2, 7, 2, 2, 1, 1, 2, 13, 2, 5, 1, 6, 4, 1, 2, 8, 1, 1, 1, 1, 2, 1, 12, 1, 2, 2, 15, 1, 1, 4, 6, 4, 2, 2, 10, 6, 1, 3, 2, 1, 2, 3, 2
Offset: 1

Views

Author

Reinhard Zumkeller, May 24 2009

Keywords

Comments

A160697 and A160698 give record values and where they occur.

Crossrefs

Programs

  • PARI
    a(n) = core(prime(n)+1, 1)[2]; \\ Michel Marcus, Nov 06 2022

Formula

a(A049097(n)) = 1; a(A049098(n)) > 1;
a(n) = A000188(A008864(n)).

A153215 Primes p such that none of p-2, p-1, p+1, and p+2 is squarefree.

Original entry on oeis.org

727, 1423, 1861, 3719, 6173, 9749, 11321, 13183, 19073, 20873, 23227, 23473, 23827, 26981, 27883, 34351, 35323, 41263, 42677, 44449, 45127, 45523, 47527, 48751, 49727, 52391, 53623, 53849, 68749, 71993, 72559, 78823, 83609, 89227, 92779
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    << NumberTheory`NumberTheoryFunctions` lst={}; Do[p=Prime[n];If[ !SquareFreeQ[p-1]&&!SquareFreeQ[p+1]&&!SquareFreeQ[p-2]&&!SquareFreeQ[p+2],AppendTo[lst,p]],{n,4*7!}]; lst

A023510 Greatest exponent in prime-power factorization of prime(n) + 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

If a(n)=1 then prime(a(n)) is a term in A049097. - Zak Seidov, Jul 20 2016

Examples

			For n=5, the fifth prime is 11, and the prime factorization of 11 + 1 = 12 is 2^2*3. This has exponents 2 and 1, so a(5) is the largest of these exponents, 2. - _Michael B. Porter_, Jul 20 2016
		

Crossrefs

Programs

  • Mathematica
    Table[Max[#[[2]] & /@ FactorInteger[Prime[k] + 1]], {k, 10000}] (* Zak Seidov, Jul 19 2016 *)
  • PARI
    a(n) = vecmax(factor(prime(n)+1)[,2]) \\ Michel Marcus, Jul 20 2016

Formula

a(n) = A051903(A008864(n)). - Michel Marcus, Jul 20 2016
Showing 1-10 of 17 results. Next