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.
%I A039787 #53 May 01 2025 16:05:50 %S A039787 2,3,7,11,23,31,43,47,59,67,71,79,83,103,107,131,139,167,179,191,211, %T A039787 223,227,239,263,283,311,331,347,359,367,383,419,431,439,443,463,467, %U A039787 479,499,503,547,563,571,587,599,607,619,643,647,659,683,691,719,743 %N A039787 Primes p such that p-1 is squarefree. %C A039787 An equivalent definition: numbers n such that phi(n) is equal to the squarefree kernel of n-1. %C A039787 Minimal value of first differences (between odd terms) is 4. - _Zak Seidov_, Apr 16 2013 %C A039787 The density of this set in A000040 is Artin's constant A = A005596 = 37.39...%, see Mirsky. - _Charles R Greathouse IV_, Oct 26 2015 %H A039787 N. J. A. Sloane, <a href="/A039787/b039787.txt">Table of n, a(n) for n = 1..25000</a>, Oct 25 2015 (extending earlier b-file of _Zak Seidov_) %H A039787 Theodor Estermann, <a href="http://eudml.org/doc/159528">Einige Sätze über quadratfreie Zahlen</a>, Math. Ann. 105:1 (1931), pp. 653-662. %H A039787 Leon Mirsky, <a href="http://www.jstor.org/stable/2305811">The number of representations of an integer as the sum of a prime and a k-free integer</a>, American Mathematial Monthly 56:1 (1949), pp. 17-19. %e A039787 phi(43)=42, 42=2^1*3^1*7^1, 2*3*7=42. %e A039787 p=223 is here because p-1=222=2*3*37 %p A039787 isA039787 := proc(n) %p A039787 if isprime(n) then %p A039787 numtheory[issqrfree](n-1) ; %p A039787 else %p A039787 false; %p A039787 end if; %p A039787 end proc: %p A039787 for n from 2 to 100 do %p A039787 if isA039787(n) then %p A039787 printf("%d,",n) ; %p A039787 end if; %p A039787 end do: # _R. J. Mathar_, Apr 17 2013 %p A039787 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 %t A039787 Select[Prime[Range[132]],SquareFreeQ[#-1]&](* _Zak Seidov_, Aug 22 2012 *) %o A039787 (Magma) [p: p in PrimesUpTo(780) | IsSquarefree(p-1)]; // _Bruno Berselli_, Mar 03 2011 %o A039787 (PARI) is(n)=isprime(n) && issquarefree(n-1) \\ _Charles R Greathouse IV_, Jul 02 2013 %o A039787 (PARI) forprime(p=2, 1e3, if(issquarefree(p-1), print1(p", "))); \\ _Altug Alkan_, Oct 26 2015 %Y A039787 Cf. A000010, A007947, A049092 (complement). %K A039787 nonn %O A039787 1,1 %A A039787 _Olivier Gérard_ %E A039787 More terms from _Labos Elemer_