[go: up one dir, main page]

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”).

A173683 revision #22

A173683
Sum of n mod p, for p = 2, 3, 5, ..., smallest prime >= n.
1
1, 0, 1, 5, 3, 7, 4, 14, 16, 14, 8, 20, 13, 24, 23, 28, 18, 38, 27, 48, 47, 43, 29, 57, 62, 57, 64, 65, 46, 76, 56, 97, 95, 88, 88, 95, 70, 99, 96, 102, 74, 117, 88, 133, 140, 130, 98, 156, 165, 174, 170, 171, 134, 199, 200, 208, 203, 189, 147, 214
OFFSET
1,4
LINKS
EXAMPLE
a(1) = 1 because 1 mod 2 = 1 where 2 = smallest prime >= 1.
MAPLE
a:= n-> add(n mod ithprime(i), i=1..numtheory[pi](nextprime(n-1))):
seq(a(n), n=1..60); # Alois P. Heinz, Nov 25 2010
CROSSREFS
Sequence in context: A021953 A171530 A266684 * A099408 A110265 A275415
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Alois P. Heinz, Nov 25 2010
STATUS
approved