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-4 of 4 results.

A340741 Numbers k such that A340740(k) is prime.

Original entry on oeis.org

7, 8, 9, 11, 12, 13, 15, 18, 19, 28, 31, 32, 34, 36, 44, 46, 47, 51, 52, 62, 64, 67, 69, 70, 73, 83, 88, 109, 110, 112, 128, 148, 153, 159, 189, 190, 192, 206, 212, 214, 222, 224, 226, 244, 245, 261, 267, 269, 280, 282, 283, 287, 300, 305, 312, 315, 319, 323, 366, 370, 378, 381, 388, 394, 404
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 18 2021

Keywords

Examples

			a(3) = 9 is a term because A340740(9) = 2 is prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      add(`if`(igcd(k,n)=1, n mod k, 0),k=1..floor(n/2))
    end proc:
    select(t -> isprime(f(t)), [$1..1000]);
  • Mathematica
    A340741[n_] :=
      Position[Table[
         PrimeQ[Sum[
           Mod[m, i]*Floor[1/GCD[i, m]], {i, Floor[(m - 1)/2]}]], {m, 1,
          n}], True] // Flatten;
    A340741[404] (* Robert P. P. McKone, Jan 19 2021 *)
  • PARI
    isok(n) = isprime(sum(k=1, n\2, if (gcd(k, n)==1, n%k))); \\ Michel Marcus, Jan 18 2021

A340742 Primes in A340740, in the order in which they occur.

Original entry on oeis.org

2, 2, 2, 7, 2, 7, 5, 7, 19, 13, 47, 31, 31, 17, 53, 41, 127, 79, 61, 113, 103, 229, 149, 73, 257, 383, 173, 613, 263, 293, 439, 541, 787, 883, 1039, 647, 643, 1129, 1151, 1181, 769, 1153, 1303, 1559, 2153, 2221, 2393, 3881, 1427, 1429, 4211, 3691, 1291, 3919, 1549, 2371, 4691, 4909, 2251, 2713, 2143, 4957, 3863, 4073, 4337
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 18 2021

Keywords

Comments

Terms occurring more than once include 2, 7, 31, and 4073. Are there any others?

Examples

			a(3) = A340740(9) = 2.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      add(`if`(igcd(k, n)=1, n mod k, 0), k=1..floor(n/2))
    end proc:
    select(isprime, map(f, [$1..1000]));

Formula

a(n) = A340740(A340741(n)).

A342503 Numbers k such that k divides A340740(k).

Original entry on oeis.org

1, 2, 3, 4, 6, 19, 48, 111, 4630, 5428, 13569, 41628, 87659, 108990, 555716, 751863, 973813, 5124585, 8663699, 19545678, 24330343
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 16 2021

Keywords

Examples

			a(8) = 111 is a term because 111 divides A340740(111) = 444.
		

Crossrefs

Cf. A340740.

Programs

  • Maple
    filter:= proc(n) local k; add(`if`(igcd(k,n)=1, (n-k) mod k, 0),k=1..n/2) mod n = 0 end proc:
    select(filter, [$1..10^5]);
  • Python
    from math import gcd
    A342503_list = [k for k in range(1,10**4) if sum(k % i for i in range(1,k//2+1) if gcd(i,k) == 1) % k == 0] # Chai Wah Wu, Mar 18 2021

Extensions

a(14)-a(17) from Chai Wah Wu, Mar 18 2021
a(18)-a(19) from Martin Ehrenstein, May 14 2021
a(20) from Kevin P. Thompson, Jan 19 2023
a(21) from Kevin P. Thompson, Feb 07 2023

A342591 Numbers k such that A340740(k) <= k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 30, 32, 33, 34, 36, 40, 42, 46, 48, 54, 60, 78
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 16 2021

Keywords

Comments

Numbers k such that Sum_{1<=j<=k/2, j and k coprime} (k-j mod j) <= k.
Conjecture: these are all the terms.
The terms with A340740(k) = k are 19 and 48.

Examples

			a(7) = 7 is a term because A340740(7) = 2 <= 7.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      add(`if`(igcd(k, n)=1, n mod k, 0), k=1..floor(n/2))
    end proc:
    select(t -> f(t) <= t, [$1..1000]);
Showing 1-4 of 4 results.