cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A302567 a(n) is the number of primes less than the n-th prime that divide the sum of primes up to the n-th prime.

This page as a plain text file.
%I A302567 #36 Apr 30 2019 08:33:22
%S A302567 0,0,1,0,2,0,1,2,2,1,2,0,3,0,2,1,3,1,1,1,1,1,3,1,3,2,2,1,3,2,3,1,3,1,
%T A302567 1,1,3,2,3,2,3,1,3,1,3,1,2,2,3,3,3,2,4,1,1,3,4,2,1,0,2,1,2,0,1,2,2,3,
%U A302567 2,3,3,1,3,1,1,2,4,1,3,3,1,1,1,4,3,2,4,3,3,3,4,1,1,2,1,0,2,3,2,0,2,0,4,1,4
%N A302567 a(n) is the number of primes less than the n-th prime that divide the sum of primes up to the n-th prime.
%C A302567 This sequence differs from A105783 only at n = 1, 3, 20, 31464, 22096548, ... (the terms of A024011); see Example section. - _Jon E. Schoenfield_, Apr 11 2018
%H A302567 Robert Israel, <a href="/A302567/b302567.txt">Table of n, a(n) for n = 1..10000</a>
%H A302567 Caldwell and Honaker, Prime Curios!: <a href="https://primes.utm.edu/curios/page.php?number_id=17023">163117</a>
%F A302567 a(n) = A105783(n) - 1 if n is in A024011; otherwise, a(n) = A105783(n). - _Jon E. Schoenfield_, Apr 11 2018
%e A302567 a(13)=3 because the 13th prime is 41 and the sum of primes up to 41 is 238, which has 3 distinct prime factors less than 41.
%e A302567 a(20)=1 because the 20th prime is 71 and the sum of primes up to 71 is 639 = 7*71, which has only 1 distinct prime factor less than 71. - _Jon E. Schoenfield_, Apr 11 2018
%p A302567 s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
%p A302567 a:= n-> nops(select(x-> x < ithprime(n), numtheory[factorset](s(n)))):
%p A302567 seq(a(n), n=1..100);  # _Alois P. Heinz_, Apr 11 2018
%t A302567 a[n_] := (S = Total[P = Prime[Range[n]]]; Count[P, p_ /; Divisible[S, p]]);
%t A302567 Array[a, 100] (* _Jean-François Alcover_, Apr 30 2019 *)
%o A302567 (PARI) a(n) = #select(x->(x < prime(n)), factor(sum(k=1, n, prime(k)))[,1]); \\ _Michel Marcus_, Apr 11 2018
%Y A302567 Cf. A000040, A007504, A024011, A105783.
%K A302567 nonn
%O A302567 1,5
%A A302567 _G. L. Honaker, Jr._, Apr 11 2018