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.

A262965 Least number k such that k mod s = prime(n) where s is the sum of the distinct primes dividing k.

Original entry on oeis.org

12, 10, 14, 15, 26, 57, 38, 85, 87, 62, 111, 129, 86, 603, 159, 177, 122, 201, 219, 146, 237, 927, 267, 545, 309, 206, 327, 218, 1057, 1016, 1359, 411, 278, 1267, 302, 471, 489, 3088, 519, 537, 362, 1561, 386, 597, 398, 1687, 3856, 687, 458, 1897, 717, 482
Offset: 1

Views

Author

Michel Lagneau, Oct 05 2015

Keywords

Comments

Conjecture: a(n) exists for all n > 0.
Many terms are numbers with two distinct prime divisors, exceptions being a(157) = 15465, a(254) = 25815, a(279) = 28695, a(303) = 31665, ... which have three prime distinct divisors, ...

Examples

			a(5) = 26 because 26 = 2*13 => 26 mod (2+13) = 26 mod 15 = 11 = prime(5).
		

Crossrefs

Cf. A008472.

Programs

  • Mathematica
    Table[k=1;While[Mod[k,Plus@@First[Transpose[FactorInteger[k]]]]!=Prime[n],k++];k,{n,50}]
  • PARI
    spf(k) = my(f = factor(k)); vecsum(f[,1]);
    a(n) = {k=2; while (k % spf(k) != prime(n), k++); k;} \\ Michel Marcus, Oct 06 2015
    
  • Python
    from sympy import prime, primefactors
    def a(n):
        k, target = 2, prime(n)
        while k%sum(primefactors(k)) != target: k += 1
        return k
    print([a(n) for n in range(1, 53)]) # Michael S. Branicky, Dec 10 2021