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!)
A135721 a(n) is the smallest Carmichael number (A002997) divisible by the n-th prime, or 0 if no such number exists. 5
561, 1105, 1729, 561, 1105, 561, 1729, 6601, 2465, 2821, 29341, 6601, 334153, 62745, 2433601, 74165065, 29341, 8911, 10024561, 10585, 2508013, 55462177, 62745, 46657, 101101, 52633, 84350561, 188461, 278545, 1152271, 18307381, 410041, 2628073, 12261061, 838201 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..10001 (calculated using data from Claude Goutier; terms 2..1000 from Donovan Johnson)
EXAMPLE
561 is the first Carmichael number and its prime factors are 3, 11, 17 (2nd, 5th and 7th primes), so a(2), a(5) and a(7) are equal to 561. - Michel Marcus, Nov 07 2013
MATHEMATICA
c = Cases[Range[1, 10000000, 2], n_ /; Mod[n, CarmichaelLambda@ n] == 1 && ! PrimeQ@ n]; Table[First@ Select[c, Mod[#, Prime@ n] == 0 &], {n, 2, 16}] (* Michael De Vlieger, Aug 28 2015, after Artur Jasinski at A002997 *)
PROG
(PARI) Korselt(n)=my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]>1||(n-1)%(f[i, 1]-1), return(0))); 1
isA002997(n)=n%2 && !isprime(n) && Korselt(n) && n>1
a(n) = my(pn=prime(n), cn = 31*pn); until (isA002997(cn+=2*pn), ); cn; \\ Michel Marcus, Nov 07 2013, improved by M. F. Hasler, Apr 14 2015
(PARI) Korselt(n)=my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]>1||(n-1)%(f[i, 1]-1), return(0))); 1
a(n, p=prime(n))=my(m=lift(Mod(1/p, p-1)), c=max(m, 33)*p, mp=m*p); while(!isprime(c) && !Korselt(c), c+=mp); c \\ Charles R Greathouse IV, Apr 15 2015
CROSSREFS
Sequence in context: A137198 A194231 A141705 * A290486 A253595 A047713
KEYWORD
nonn,changed
AUTHOR
Artur Jasinski, Nov 25 2007
EXTENSIONS
More terms from Michel Marcus, Nov 07 2013
Escape clause added by Jianing Song, Dec 12 2021
STATUS
approved

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 25 12:15 EDT 2024. Contains 371969 sequences. (Running on oeis4.)