A039787 Primes p such that p-1 is squarefree.
2, 3, 7, 11, 23, 31, 43, 47, 59, 67, 71, 79, 83, 103, 107, 131, 139, 167, 179, 191, 211, 223, 227, 239, 263, 283, 311, 331, 347, 359, 367, 383, 419, 431, 439, 443, 463, 467, 479, 499, 503, 547, 563, 571, 587, 599, 607, 619, 643, 647, 659, 683, 691, 719, 743
Offset: 1
Keywords
Examples
phi(43)=42, 42=2^1*3^1*7^1, 2*3*7=42. p=223 is here because p-1=222=2*3*37
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..25000, Oct 25 2015 (extending earlier b-file of _Zak Seidov_)
- Theodor Estermann, Einige Sätze über quadratfreie Zahlen, Math. Ann. 105:1 (1931), pp. 653-662.
- Leon Mirsky, The number of representations of an integer as the sum of a prime and a k-free integer, American Mathematial Monthly 56:1 (1949), pp. 17-19.
Programs
-
Magma
[p: p in PrimesUpTo(780) | IsSquarefree(p-1)]; // Bruno Berselli, Mar 03 2011
-
Maple
isA039787 := proc(n) if isprime(n) then numtheory[issqrfree](n-1) ; else false; end if; end proc: for n from 2 to 100 do if isA039787(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Apr 17 2013 with(numtheory): lis:=[]; for n from 1 to 10000 do if issqrfree(ithprime(n)-1) then lis:=[op(lis), ithprime(n)]; fi; od: lis; # N. J. A. Sloane, Oct 25 2015
-
Mathematica
Select[Prime[Range[132]],SquareFreeQ[#-1]&](* Zak Seidov, Aug 22 2012 *)
-
PARI
is(n)=isprime(n) && issquarefree(n-1) \\ Charles R Greathouse IV, Jul 02 2013
-
PARI
forprime(p=2, 1e3, if(issquarefree(p-1), print1(p", "))); \\ Altug Alkan, Oct 26 2015
Extensions
More terms from Labos Elemer
Comments