login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the number of distinct primes of the form A007504(n) mod p for the first n primes p.
2

%I #9 Apr 30 2021 11:42:13

%S 0,1,0,2,1,1,3,1,2,2,2,5,2,3,2,6,5,5,6,5,5,5,6,8,4,4,4,8,6,8,6,9,10,9,

%T 5,10,7,10,9,11,9,8,11,5,11,4,10,14,9,19,9,14,9,11,11,9,9,15,15,17,10,

%U 11,13,15,8,15,12,17,15,10,13,15,14,17,12,13,12,16,13,13,18,16,18,15,15,17

%N a(n) is the number of distinct primes of the form A007504(n) mod p for the first n primes p.

%H Robert Israel, <a href="/A343796/b343796.txt">Table of n, a(n) for n = 1..10000</a>

%e a(8) = 1 because A007504(8) = 77 and there is only one prime of the form 77 mod p for the first 8 primes p, namely 2 = 77 mod 3 = 77 mod 5.

%p N:= 200: # for a(1)..a(N)

%p P:= [seq(ithprime(i),i=1..N)]:

%p S:= ListTools:-PartialSums(P):

%p PS:= convert(P,set):

%p f:= proc(n)

%p nops(map(p -> S[n] mod p, PS[1..n]) intersect PS);

%p end proc:

%p map(f, [$1..N]);

%Y Cf. A007504, A343798.

%K nonn

%O 1,4

%A _J. M. Bergot_ and _Robert Israel_, Apr 29 2021