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.

A355009 Primes in A354975.

Original entry on oeis.org

2, 47, 173, 317, 409, 967, 3877, 6173, 6449, 14401, 16477, 18257, 28183, 30119, 73561, 76607, 86579, 90227, 92867, 97987, 110777, 112663, 114749, 117671, 121553, 130069, 136033, 141403, 144671, 190891, 205129, 207301, 208283, 216481, 221677, 229199, 235337, 231223, 261347, 265123, 281191, 311473
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jun 15 2022

Keywords

Comments

Primes are in the order in which they appear in A354975, so the sequence is not increasing: for example, a(37) = 235337 > 231223 = a(38).

Examples

			a(3) = A354975(15) = 173 is the third member of A354975 that is prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
       add(ithprime(n+k) mod ithprime(k), k=1..n)
    end proc:
    select(isprime, map(f, [$1..1000]);
  • Mathematica
    Block[{nn = 450, a, p}, Do[Set[p[i], Prime[i]], {i, 2 nn}]; Reap[Do[If[PrimeQ[#], Sow[#]] &@ Sum[Mod[p[i + j], p[j]], {j, i}], {i, nn}]][[-1, -1]]] (* Michael De Vlieger, Jun 19 2022 *)
  • PARI
    lista(nn) = my(list=List()); for (n=1, nn, if (isprime(p=sum(i=1, n, prime(i+n) % prime(i))), listput(list, p));); Vec(list); \\ Michel Marcus, Jun 19 2022
    
  • Python
    from itertools import count, islice
    from sympy import prime, isprime
    def A355009_gen(): # generator of terms
        return filter(isprime,(sum(prime(i+n) % prime(i) for i in range(1,n+1)) for n in count(1)))
    A355009_list = list(islice(A355009_gen(),5)) # Chai Wah Wu, Jun 20 2022

Formula

a(n) = A354975(A354972(n)).