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.

A340996 a(n) is the number of different primes that can be expressed as n mod p where p < n is prime.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 2, 1, 1, 1, 2, 2, 2, 1, 3, 2, 3, 2, 3, 1, 3, 2, 5, 2, 4, 2, 4, 3, 4, 3, 3, 4, 3, 1, 6, 3, 4, 2, 6, 3, 6, 3, 5, 4, 5, 4, 7, 4, 6, 4, 5, 3, 8, 3, 5, 3, 6, 4, 9, 3, 6, 5, 8, 4, 7, 2, 6, 4, 8, 4, 9, 5, 7, 5, 8, 3, 9, 5, 7, 7, 7, 4, 10, 5, 6, 5, 7, 6, 12, 5, 7, 7, 7, 4, 11, 5, 9
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Feb 01 2021

Keywords

Comments

a(n) is the number of primes p < n such that n-p has a prime factor > p.
a(n) <= A056172(n-1), with equality for n = 1, 2, 3, 4, 5, 8, 24.

Examples

			a(8) = 2 because 2 = 8 mod 3 and 3 = 8 mod 5.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k; nops(select(isprime,{seq(n mod k, k=select(isprime,[$2..n-1]))})) end proc:
    map(f, [$1..100]);