The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A245097 Number of primes greater than n and not greater than the smallest pseudoprime to base n. 1

%I #15 Jan 24 2022 04:34:30

%S 2,67,22,4,27,8,5,0,5,7,1,13,2,0,62,9,7,2,6,0,8,11,2,0,0,0,9,5,1,5,4,

%T 0,12,0,4,13,2,0,12,12,14,33,7,0,7,18,3,0,3,0,3,8,2,0,2,0,2,16,6,51,6,

%U 0,50,0,11,6,4,0,4,20,7,3,8,0,3,0,32,47,2,0

%N Number of primes greater than n and not greater than the smallest pseudoprime to base n.

%H Reinhard Zumkeller, <a href="/A245097/b245097.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = Sum {k=n+1..A007535(n)} A010051(k).

%F a(n) = A000720(A007535(n)) - A000720(n).

%o (Haskell)

%o a245097 n = sum $ map a010051' [n + 1 .. a007535 n]

%o (PARI) f(n) = forcomposite(m=n+1, , if(Mod(n, m)^(m-1)==1, return(m))); \\ A007535

%o a(n) = primepi(f(n)) - primepi(n); \\ _Michel Marcus_, Jan 24 2022

%Y Cf. A000720, A007535, A010051.

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Nov 12 2014

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 May 15 09:20 EDT 2024. Contains 372540 sequences. (Running on oeis4.)