OFFSET
3,1
COMMENTS
Is this sequence infinite? - Charles R Greathouse IV, Sep 23 2012
a(15) <= 6414735508880546179805759. a(16) <= 466807799396932243821123839. - Donovan Johnson, Sep 26 2012
LINKS
Daniel Suteu, Table of n, a(n) for n = 3..35
Ed Copeland and Brady Haran, Something special about 399, Numberphile video (2015).
PROG
(PARI)
lucas_carmichael(A, B, k) = A=max(A, vecprod(primes(k+1))\2); (f(m, l, lo, k) = my(list=List()); my(hi=sqrtnint(B\m, k)); if(lo > hi, return(list)); if(k==1, lo=max(lo, ceil(A/m)); my(t=lift(-1/Mod(m, l))); while(t < lo, t += l); forstep(p=t, hi, l, if(isprime(p), my(n=m*p); if((n+1)%(p+1) == 0, listput(list, n)))), forprime(p=lo, hi, if(gcd(m, p+1) == 1, list=concat(list, f(m*p, lcm(l, p+1), p+1, k-1))))); list); vecsort(Vec(f(1, 1, 3, k)));
a(n) = if(n < 3, return()); my(x=vecprod(primes(n+1))\2, y=2*x); while(1, my(v=lucas_carmichael(x, y, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Feb 24 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Tim Johannes Ohrtmann, Sep 20 2012
EXTENSIONS
a(7)-a(12) from Donovan Johnson, Sep 22 2012
a(13)-a(14) from Donovan Johnson, Sep 26 2012
a(15)-a(16) confirmed and a(17) added by Daniel Suteu, Aug 29 2022
STATUS
approved