login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216929 Number of Lucas-Carmichael numbers less than 10^n. 2

%I #15 Dec 01 2023 08:33:48

%S 0,0,2,8,26,60,135,323,791,1840,4216,9967,23070,54356,129125

%N Number of Lucas-Carmichael numbers less than 10^n.

%o (PARI)

%o lucas_carmichael(A, B, k) = A=max(A, vecprod(primes(k+1))\2); (f(m, l, lo, k) = my(list=List()); my(hi=min(sqrtint(B+1)-1, 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); f(1, 1, 3, k);

%o a(n) = my(N=10^n); my(count=0); for(k=3, oo, if(vecprod(primes(k+1))\2 > N, break); count += #lucas_carmichael(1, N, k)); count; \\ _Daniel Suteu_, Dec 01 2023

%Y Cf. A006972 (Lucas-Carmichael numbers).

%K nonn,more

%O 1,3

%A _Tim Johannes Ohrtmann_, Sep 20 2012

%E a(9)-a(11) from _Donovan Johnson_, Sep 22 2012

%E a(12) from _Donovan Johnson_, Sep 26 2012

%E a(13)-a(15) from _Daniel Suteu_, Dec 01 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 03:28 EDT 2024. Contains 371782 sequences. (Running on oeis4.)