A175075 Primes q with result 2 under iterations of {r mod (max prime p < r)} starting at r = q.
2, 5, 7, 13, 19, 31, 43, 61, 73, 103, 109, 139, 151, 181, 193, 199, 229, 241, 271, 283, 313, 349, 421, 433, 463, 523, 571, 601, 619, 643, 661, 811, 823, 829, 859, 883, 1021, 1033, 1051, 1063, 1093, 1153, 1231, 1279, 1291, 1303, 1321, 1429, 1453, 1483, 1489
Offset: 1
Keywords
Examples
Iteration procedure for a(5) = 19: 19 mod 17 = 2. Iteration procedure for a(83) = 2999: 2999 mod 2971 = 28, 28 mod 23 = 5, 5 mod 3 = 2.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
fQ[p_] := Block[{r = p}, While[r > 2, r = Mod[r, NextPrime[r, -1]]]; r == 2]; Select[ Prime@ Range@ 253, fQ] (* Robert G. Wilson v, Aug 09 2010 *)
-
PARI
is(n)=if(!isprime(n), return(0)); while(n>4, n-=precprime(n-1)); n==2 \\ Charles R Greathouse IV, Jan 12 2022
-
PARI
has(n)=while(n>4, n-=precprime(n-1)); n==2 list(lim)=my(v=List([2]),p=3); forprime(q=5,lim, if(has(q-p), listput(v,q)); p=q); Vec(v) \\ Charles R Greathouse IV, Jan 12 2022
Formula
Extensions
More terms from Robert G. Wilson v, Aug 09 2010
A175080 inserted in comment - R. J. Mathar, Sep 25 2010
Comments