A227006 Numbers k such that k-1 is not squarefree or a prime divisor of k-1 is in the sequence.
5, 6, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Crossrefs
Cf. A227007.
Programs
-
Mathematica
Needs["NumberTheory`NumberTheoryFunctions`"];Property[2] = False; Property[{}] = False; Property[n_] := Property[n] = If[ListQ[n],Property[n[[1, 1]]] || Property[Rest[n]], SquareFreeQ[n - 1] == False || Property[fa[n - 1]]]; Select[1 + Range[100], Property]
-
PARI
is(n)=if(n<7,return(n>4)); if(n>1807 || !issquarefree(n-1), return(1)); fordiv(n-1,d,if(isprime(d) && is(d), return(1))); 0 \\ Charles R Greathouse IV, Nov 13 2013
Formula
a(n) = n + 16 for n > 1791. - Charles R Greathouse IV, Jun 27 2013
Extensions
Definition corrected by Charles R Greathouse IV, Nov 13 2013
Comments