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.

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

This page as a plain text file.
%I A049098 #40 Aug 10 2024 22:32:42
%S A049098 3,7,11,17,19,23,31,43,47,53,59,67,71,79,83,89,97,103,107,127,131,139,
%T A049098 149,151,163,167,179,191,197,199,211,223,227,233,239,241,251,263,269,
%U A049098 271,283,293,307,311,331,337,347,349,359,367,379,383,419,431,439,443
%N A049098 Primes p such that p+1 is divisible by a square.
%C A049098 Numbers m such that A010051(m)*(1-A008966(m+1)) = 1. - _Reinhard Zumkeller_, May 21 2009
%C A049098 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
%H A049098 T. D. Noe, <a href="/A049098/b049098.txt">Table of n, a(n) for n = 1..1000</a>
%H A049098 Leon Mirsky, <a href="https://www.jstor.org/stable/2305811">The number of representations of an integer as the sum of a prime and a k-free integer</a>, The American Mathematical Monthly, Vol. 56, No. 1 (1949), pp. 17-19.
%F A049098 A160696(a(n)) > 1. - _Reinhard Zumkeller_, May 24 2009
%e A049098 31 is a term because 32 is divisible by a square, 16.
%e A049098 101 is not a term because 102 = 2*3*17 is squarefree.
%p A049098 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
%t A049098 Select[Prime[Range[200]],!SquareFreeQ[#+1]&]   (* _Harvey P. Dale_, Mar 27 2011 *)
%t A049098 Select[Prime[Range[200]], MoebiusMu[# + 1] == 0 &] (* _Alonso del Arte_, Oct 18 2011 *)
%o A049098 (Haskell)
%o A049098 a049098 n = a049098_list !! (n-1)
%o A049098 a049098_list = filter ((== 0) . a008966 . (+ 1)) a000040_list
%o A049098 -- _Reinhard Zumkeller_, Oct 18 2011
%o A049098 (PARI) forprime(p=2,1e4,if(!issquarefree(p+1),print1(p", "))) \\ _Charles R Greathouse IV_, Oct 18 2011
%Y A049098 Cf. A005596, A008966, A010051, A049097 (complement with respect to A000040), A160696.
%K A049098 nonn,easy,nice
%O A049098 1,1
%A A049098 _Labos Elemer_