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!)
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. 1
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
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
LINKS
Caldwell and Honaker, Prime Curios!: 163117
FORMULA
a(n) = A105783(n) - 1 if n is in A024011; otherwise, a(n) = A105783(n). - Jon E. Schoenfield, Apr 11 2018
EXAMPLE
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.
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
MAPLE
s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
a:= n-> nops(select(x-> x < ithprime(n), numtheory[factorset](s(n)))):
seq(a(n), n=1..100); # Alois P. Heinz, Apr 11 2018
MATHEMATICA
a[n_] := (S = Total[P = Prime[Range[n]]]; Count[P, p_ /; Divisible[S, p]]);
Array[a, 100] (* Jean-François Alcover, Apr 30 2019 *)
PROG
(PARI) a(n) = #select(x->(x < prime(n)), factor(sum(k=1, n, prime(k)))[, 1]); \\ Michel Marcus, Apr 11 2018
CROSSREFS
Sequence in context: A128256 A279009 A279008 * A303113 A065051 A084665
KEYWORD
nonn
AUTHOR
G. L. Honaker, Jr., Apr 11 2018
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 19 16:21 EDT 2024. Contains 371794 sequences. (Running on oeis4.)