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.

Showing 1-2 of 2 results.

A352996 a(n) = n*(n+1)/2 mod (sum (with multiplicity) of prime factors of n).

Original entry on oeis.org

1, 0, 2, 0, 1, 0, 0, 3, 6, 0, 1, 0, 6, 0, 0, 0, 3, 0, 3, 1, 6, 0, 3, 5, 6, 0, 10, 0, 5, 0, 8, 1, 6, 6, 6, 0, 6, 12, 6, 0, 3, 0, 0, 1, 6, 0, 10, 7, 3, 6, 1, 0, 0, 4, 10, 3, 6, 0, 6, 0, 6, 1, 4, 3, 3, 0, 15, 23, 7, 0, 0, 0, 6, 3, 5, 15, 3, 0, 3, 9, 6, 0, 0, 3, 6, 20, 6, 0, 0, 6, 12, 19, 6, 0, 2, 0
Offset: 2

Views

Author

J. M. Bergot and Robert Israel, Apr 14 2022

Keywords

Comments

If n is an odd prime, a(n) = 0.
If n is prime, a(n^2) = n.

Examples

			For n = 6, A000217(6) = 6*7/2 = 21 and A001414(6) = 2+3 = 5, so a(6) = 21 mod 5 = 1.
		

Crossrefs

Programs

  • Maple
    seq((n*(n+1)/2) mod add(t[1]*t[2],t=ifactors(n)[2]), n=2..100);
  • Mathematica
    a[n_] := Mod[n*(n + 1)/2, Plus @@ Times @@@ FactorInteger[n]]; Array[a, 100, 2] (* Amiram Eldar, Apr 15 2022 *)
  • Python
    from sympy import factorint
    def a(n): return (n*(n+1)//2)%sum(p*e for p, e in factorint(n).items())
    print([a(n) for n in range(2, 98)]) # Michael S. Branicky, Apr 24 2022

Formula

a(n) = A000217(n) mod A001414(n).

A353001 Numbers k such that the k-th triangular number mod the sum (with multiplicity) of prime factors of k, and the k-th triangular number mod the sum of divisors of k, are both prime.

Original entry on oeis.org

4, 57, 70, 93, 129, 217, 322, 381, 417, 453, 513, 565, 597, 646, 682, 781, 813, 921, 925, 1057, 1081, 1102, 1137, 1165, 1197, 1261, 1317, 1393, 1405, 1558, 1582, 1641, 1750, 1798, 1846, 1857, 1918, 1929, 2073, 2101, 2110, 2173, 2181, 2305, 2329, 2361, 2482, 2506, 2569, 2577, 2626, 2649, 2653
Offset: 1

Views

Author

Robert Israel, Apr 14 2022

Keywords

Comments

Numbers k such that A232324(k) and A352996(k) are prime.

Examples

			a(3) = 70 is a term because 70*71/2 = 2485, A000217(70) = 144, A001414(70) = 14, and both 2485 mod 144 = 37 and 2485 mod 14 = 7 are prime.
		

Crossrefs

Intersection of A352908 and A352997.

Programs

  • Maple
    filter:= proc(n) local a,b,c,t;
      a:= n*(n+1)/2;
      b:= add(t[1]*t[2],t=ifactors(n)[2]);
      if not isprime(a mod b) then return false fi;
      c:= numtheory:-sigma(n);
      isprime(a mod c)
    end proc:
    select(filter, [$2..3000]);
  • Mathematica
    Select[Range[3000], And @@ PrimeQ[Mod[#*(# + 1)/2, {DivisorSigma[1, #], Plus @@ Times @@@ FactorInteger[#]}]] &] (* Amiram Eldar, Apr 15 2022 *)
Showing 1-2 of 2 results.