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.

Previous Showing 11-13 of 13 results.

A272476 a(n) = n if n is prime, a(n) = 2*n+3 otherwise.

Original entry on oeis.org

3, 5, 2, 3, 11, 5, 15, 7, 19, 21, 23, 11, 27, 13, 31, 33, 35, 17, 39, 19, 43, 45, 47, 23, 51, 53, 55, 57, 59, 29, 63, 31, 67, 69, 71, 73, 75, 37, 79, 81, 83, 41, 87, 43, 91, 93, 95, 47, 99, 101, 103, 105, 107, 53, 111, 113, 115, 117, 119, 59, 123, 61, 127
Offset: 0

Views

Author

Vincenzo Librandi, May 02 2016

Keywords

Comments

Prime numbers repeated: 3, 5, 11, 19, 23, 31, 43, 47, 53, 59, 67, 71, ..., that is A065091 without A089531.

Crossrefs

Programs

  • Magma
    [IsPrime(n) select n else 2*n+3: n in [0..80]];
  • Mathematica
    Table[If[PrimeQ[n], n, 2 n + 3], {n, 0, 150}]

A274465 Primes which are the sum of cousin prime pairs - 1.

Original entry on oeis.org

17, 29, 41, 89, 137, 197, 257, 389, 449, 461, 557, 617, 701, 761, 797, 881, 929, 977, 1229, 1289, 1481, 1709, 1721, 1877, 2609, 2861, 2897, 2969, 3137, 3221, 3329, 3389, 3989, 4001, 4409, 4481, 4877, 5081, 5237, 5381, 5417, 5501, 5669, 5717, 6329, 6689, 6917, 7229
Offset: 1

Views

Author

Keywords

Comments

Cousin primes are prime pairs that differ by 4. Any prime p in this sequence is such that p = (p-3)/2 + (p+5)/2 - 1, where (p-3)/2 and (p+5)/2 are also primes and they differ by 4.
Proper subset of A040117 (e.g., 5 isn't in the sequence). - David A. Corneth, Jun 24 2016
Intersection of A145471 and A089531. - Michel Marcus, Jun 27 2016
Subsequence of A072669. - Michel Marcus, Jun 27 2016

Examples

			17 = 7 + 11 - 1. Note that, (17-3)/2 = 7 and (17+5)/2 = 11 and 7, 11 are cousin prime pairs.
29 = 13 + 17 - 1. Note that, (29-3)/2 = 13 and (29+5)/2 = 17 and 13, 17 are cousin prime pairs.
41 = 19 + 23 - 1. Note that, (41-3)/2 = 19 and (41+5)/2 = 23 and 19, 23 are cousin prime pairs.
89 = 43 + 47 - 1. Note that, (89-3)/2 = 43 and (89+5)/2 = 47 and 43, 47 are cousin prime pairs.
		

Crossrefs

Programs

A386873 Smallest prime p such that (p-k-1)/k is also prime for all k=1..n.

Original entry on oeis.org

5, 7, 13, 13, 2129401, 62198641, 62198641, 62198641, 28641897012961, 5193520377811921, 64090546658938801
Offset: 1

Views

Author

Marc Morgenegg, Aug 06 2025

Keywords

Comments

All terms are the larger member of a twin prime pair, since for k=1 (p-1-1)/1=p-2 must be prime.

Examples

			a(4) = 13 is the smallest prime p such that (p-k-1)/k is prime for all k=1..4. (13-2)/1=11, (13-3)/2=5, (13-4)/3=3, (13-5)/4=2.
		

Crossrefs

Subsequence of A006512.
Cf. A089531.

Programs

  • Python
    from itertools import islice
    from gmpy2 import is_prime, next_prime
    def agen(): # generator of terms
        n = p = 1
        while True:
            k, p = 1, next_prime(p); q, r = p - 2, 0
            while r == 0 and is_prime(q): k += 1; q, r = divmod(p - k - 1, k)
            while n < k: n += 1; yield int(p)
    print(list(islice(agen(), 8))) # Michael S. Branicky, Aug 14 2025
    
  • Python
    from itertools import count
    from math import lcm
    from sympy import isprime
    def A386873(n):
        m = lcm(*range(1,n+1))
        for i in count(m+1,m):
            if isprime(i) and all(isprime((i-1)//j-1) for j in range(1,n+1)):
                return i # Chai Wah Wu, Aug 20 2025

Formula

a(n) == 1 mod lcm(1,2,...,n). - Chai Wah Wu, Aug 20 2025

Extensions

a(9)-a(11) from Jinyuan Wang, Aug 15 2025
Previous Showing 11-13 of 13 results.