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-20 of 24 results. Next

A060211 Larger term of a pair of twin primes such that the prime factors of their average are only 2 and 3. Proper subset of A058383.

Original entry on oeis.org

7, 13, 19, 73, 109, 193, 433, 1153, 2593, 139969, 472393, 786433, 995329, 57395629, 63700993, 169869313, 4076863489, 10871635969, 2348273369089, 56358560858113, 79164837199873, 84537841287169, 150289495621633, 578415690713089, 1141260857376769, 57711166318706689
Offset: 1

Views

Author

Labos Elemer, Mar 20 2001

Keywords

Comments

Larger of twin primes p such that p-1 = (2^u)*(3^w), u,w >= 1.

Examples

			a(4) = 73, {71,73} are twin primes and (71 + 73)/2 = 72 = 2*2*2*3*3.
		

Crossrefs

Programs

  • Mathematica
    Take[Select[Sort[Flatten[Table[2^a 3^b,{a,250},{b,250}]]],AllTrue[#+{1,-1},PrimeQ]&]+1,23] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 17 2019 *)
  • PARI
    isok(p) = isprime(p) && isprime(p-2) && (vecmax(factor(p-1)[,1]) == 3); \\ Michel Marcus, Sep 05 2017

Formula

a(n) = A027856(n+1) + 1. - Amiram Eldar, Mar 17 2025

Extensions

Name corrected by Sean A. Irvine, Oct 31 2022

A078884 Greater member p of a twin prime pair such that p-1 is 3-smooth.

Original entry on oeis.org

5, 7, 13, 19, 73, 109, 193, 433, 1153, 2593, 139969, 472393, 786433, 995329, 57395629, 63700993, 169869313, 4076863489, 10871635969, 2348273369089, 56358560858113, 79164837199873, 84537841287169, 150289495621633
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 11 2002

Keywords

Examples

			A000040(21)=73 and 73-1=72=2^3*3^2=A003586(17) and 73-2=71=A000040(20), therefore 73 is a term.
		

Crossrefs

Essentially the same as A060211.

Programs

  • Maple
    N:= 10^100:
    sort(select(t -> isprime(t) and isprime(t-2),
    [seq(seq(1+2^i*3^j,i=1..ilog2(floor(N/3^j))),j=0..floor(log[3](N)))])); # Robert Israel, May 14 2018
  • Mathematica
    1 + Select[With[{n = 10^15}, Sort@ Flatten@ Table[2^p * 3^q, {p, 0, Log2@ n}, {q, 0, Log[3, n/(2^p)]}] ], AllTrue[# + {-1, 1}, PrimeQ] &] (* Michael De Vlieger, May 14 2018 *)

Formula

a(n) = A027856(n) + 1 = A078883(n) + 2.

A325204 Numbers k such that k*(k+1)*(k+2) has exactly 4 distinct prime factors.

Original entry on oeis.org

5, 9, 10, 11, 12, 14, 15, 17, 18, 22, 23, 24, 25, 26, 27, 30, 31, 32, 36, 46, 47, 48, 52, 62, 71, 72, 79, 80, 81, 96, 106, 107, 126, 127, 162, 191, 192, 241, 242, 256, 382, 431, 486, 512, 576, 862, 1151, 1152, 2186, 2591, 2592, 2916, 4372, 8191, 8746, 131071, 131072, 139967, 472391, 524287, 786431, 995326, 995327
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Sep 05 2019

Keywords

Comments

Contains 2^p-1 for p in A107360 except 3.
Contains all terms of A325255 except 2 and 4.
Contains k-1 for k in A027856 except 4.
Contains k-2 for k in A327240 except 6 and 8. - Ray Chandler, Sep 14 2019

Examples

			a(3)=10 is in the sequence because 10*11*12 has four distinct prime factors: 2, 3, 5, 11.
		

Crossrefs

Programs

  • Maple
    select(t -> nops(numtheory:-factorset(t) union numtheory:-factorset(t+1) union numtheory:-factorset(t+2))=4, [$1..10^6]);
  • PARI
    select(k->4==omega(k*(k+1)*(k+2)), [1..10000]) \\ Andrew Howroyd, Sep 05 2019

A386498 a(n) is the 2-adic valuation of A386252(n).

Original entry on oeis.org

1, 2, 1, 2, 4, 1, 3, 1, 2, 3, 1, 6, 3, 3, 10, 5, 9, 1, 10, 5, 1, 9, 14, 10, 14, 3, 3, 1, 9, 6, 7, 15, 9, 7, 3, 1, 1, 3, 1, 17, 3, 13, 10, 16, 1, 4, 13, 11, 3, 5, 6, 8, 10, 15, 10, 3, 1, 3, 1, 9, 14, 10, 6, 7, 5, 2, 4, 2, 29, 26, 5, 15, 4, 2, 26, 15, 13, 17, 16
Offset: 1

Views

Author

Ken Clements, Jul 23 2025

Keywords

Examples

			a(1) = 1 because A386252(1) = 2^1 * 3^1 * 5^1
a(2) = 2 because A386252(2) = 2^2 * 3^1 * 5^1
a(3) = 1 because A386252(3) = 2^1 * 3^1 * 5^2
a(4) = 2 because A386252(4) = 2^2 * 3^2 * 5^1
		

Crossrefs

Programs

  • Mathematica
    seq[max_] := IntegerExponent[Select[Table[2^i*3^j*5^k, {i, 1, Log2[max]}, {j, 1, Log[3, max/2^i]}, {k, 1, Log[5, max/(2^i*3^j)]}] // Flatten // Sort, And @@ PrimeQ[# + {-1, 1}] &], 2]; seq[10^12] (* Amiram Eldar, Jul 24 2025 *)
  • Python
    from math import log10
    from gmpy2 import is_prime
    l2, l3, l5 = log10(2), log10(3), log10(5)
    upto_digits = 100
    sum_limit = 3 + int((upto_digits - l3 - l5)/l2)
    def TP_pi_3_upto_sum(limit): # Search all partitions up to the given exponent sum.
        unsorted_result = []
        for exponent_sum in range(3, limit+1):
            for i in range(1, exponent_sum -1):
                 for j in range(1, exponent_sum - i):
                    k = exponent_sum - i - j
                    log_N = i*l2 + j*l3 + k*l5
                    if log_N <= upto_digits:
                        N = 2**i * 3**j * 5**k
                        if is_prime(N-1) and is_prime(N+1):
                            unsorted_result.append((i, log_N))
        sorted_result = sorted(unsorted_result, key=lambda x: x[1])
        return sorted_result
    print([i for i, _ in TP_pi_3_upto_sum(sum_limit) ])

Formula

a(n) = A007814(A386252(n)).

A386499 a(n) is the 5-adic valuation of A386252(n).

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 2, 2, 3, 1, 1, 2, 1, 4, 1, 4, 6, 2, 1, 3, 3, 3, 6, 5, 3, 3, 2, 2, 6, 7, 5, 9, 7, 3, 8, 4, 8, 4, 6, 5, 6, 2, 3, 6, 4, 10, 9, 2, 4, 6, 3, 2, 3, 9, 8, 2, 6, 1, 11, 2, 5, 3, 9, 1, 1, 3, 10, 3, 3, 8, 2, 2, 7, 2, 8, 8, 5, 7, 11, 3, 5, 14
Offset: 1

Views

Author

Ken Clements, Jul 23 2025

Keywords

Examples

			a(1) = 1 because A386252(1) = 2^1 * 3^1 * 5^1
a(2) = 1 because A386252(2) = 2^2 * 3^1 * 5^1
a(3) = 2 because A386252(3) = 2^1 * 3^1 * 5^2
a(4) = 1 because A386252(4) = 2^2 * 3^2 * 5^1
		

Crossrefs

Programs

  • Mathematica
    seq[max_] := IntegerExponent[Select[Table[2^i*3^j*5^k, {i, 1, Log2[max]}, {j, 1, Log[3, max/2^i]}, {k, 1, Log[5, max/(2^i*3^j)]}] // Flatten // Sort, And @@ PrimeQ[# + {-1, 1}] &], 5]; seq[10^12] (* Amiram Eldar, Jul 24 2025 *)
  • Python
    from math import log10
    from gmpy2 import is_prime
    l2, l3, l5 = log10(2), log10(3), log10(5)
    upto_digits = 100
    sum_limit = 3 + int((upto_digits - l3 - l5)/l2)
    def TP_pi_3_upto_sum(limit): # Search all partitions up to the given exponent sum.
        unsorted_result = []
        for exponent_sum in range(3, limit+1):
            for i in range(1, exponent_sum -1):
                 for j in range(1, exponent_sum - i):
                    k = exponent_sum - i - j
                    log_N = i*l2 + j*l3 + k*l5
                    if log_N <= upto_digits:
                        N = 2**i * 3**j * 5**k
                        if is_prime(N-1) and is_prime(N+1):
                            unsorted_result.append((k, log_N))
        sorted_result = sorted(unsorted_result, key=lambda x: x[1])
        return sorted_result
    print([k for k, _ in TP_pi_3_upto_sum(sum_limit) ])

Formula

a(n) = A112765(A386252(n)).

A386500 a(n) is the 3-adic valuation of A386252(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 4, 1, 4, 1, 2, 5, 1, 3, 2, 3, 3, 2, 2, 3, 2, 3, 1, 8, 4, 7, 5, 7, 8, 3, 1, 1, 7, 3, 6, 11, 5, 1, 4, 4, 3, 1, 9, 13, 6, 3, 11, 1, 2, 11, 7, 1, 9, 15, 15, 5, 8, 12, 3, 13, 1, 14, 11, 16, 6, 19, 2, 1, 4, 8, 15, 9, 3, 10, 4, 9, 1, 8, 3, 7, 7
Offset: 1

Views

Author

Ken Clements, Jul 23 2025

Keywords

Examples

			a(1) = 1 because A386252(1) = 2^1 * 3^1 * 5^1
a(2) = 1 because A386252(2) = 2^2 * 3^1 * 5^1
a(3) = 1 because A386252(3) = 2^1 * 3^1 * 5^2
a(4) = 2 because A386252(4) = 2^2 * 3^2 * 5^1
		

Crossrefs

Programs

  • Mathematica
    seq[max_] := IntegerExponent[Select[Table[2^i*3^j*5^k, {i, 1, Log2[max]}, {j, 1, Log[3, max/2^i]}, {k, 1, Log[5, max/(2^i*3^j)]}] // Flatten // Sort, And @@ PrimeQ[# + {-1, 1}] &], 3]; seq[10^12] (* Amiram Eldar, Jul 24 2025 *)
  • Python
    from math import log10
    from gmpy2 import is_prime
    l2, l3, l5 = log10(2), log10(3), log10(5)
    upto_digits = 100
    sum_limit = 3 + int((upto_digits - l3 - l5)/l2)
    def TP_pi_3_upto_sum(limit): # Search all partitions up to the given exponent sum.
        unsorted_result = []
        for exponent_sum in range(3, limit+1):
            for i in range(1, exponent_sum -1):
                 for j in range(1, exponent_sum - i):
                    k = exponent_sum - i - j
                    log_N = i*l2 + j*l3 + k*l5
                    if log_N <= upto_digits:
                        N = 2**i * 3**j * 5**k
                        if is_prime(N-1) and is_prime(N+1):
                            unsorted_result.append((j, log_N))
        sorted_result = sorted(unsorted_result, key=lambda x: x[1])
        return sorted_result
    print([j for j, _ in TP_pi_3_upto_sum(sum_limit) ])

Formula

a(n) = A007949(A386252(n)).

A386731 a(n) = A385433(n) + A386730(n).

Original entry on oeis.org

2, 2, 3, 3, 5, 5, 7, 7, 9, 9, 13, 13, 19, 17, 17, 23, 25, 29, 31, 37, 41, 45, 41, 43, 35, 43, 51, 47, 59, 65, 91, 99, 109, 121, 145, 175, 151, 155, 213, 291, 297, 259, 283, 349, 301, 415, 365, 369, 573, 683, 1103, 1017, 1195, 1347, 1537, 1619, 1717, 1751, 1957
Offset: 1

Views

Author

Ken Clements, Jul 31 2025

Keywords

Comments

These numbers are sum of the exponents of 2 and 3 for the averages of twin primes in A027856. An interesting aspect is that after the first 2 terms, all of these are odd numbers. For all of those, the sum cannot be even because then for m = 2^i * 3^j, m-1 or m+1 would be divisible by 5.

Examples

			a(1) = A385433(1) + A386730(1) = 2
a(2) = A385433(2) + A386730(2) = 2
a(3) = A385433(3) + A386730(3) = 3
a(4) = A385433(4) + A386730(4) = 3
a(5) = A385433(5) + A386730(5) = 5
		

Crossrefs

Programs

  • Mathematica
    seq[max_] := Total[IntegerExponent[Select[Sort[Flatten[Table[2^i*3^j, {i, 1, Floor[Log2[max]]}, {j, 0, Floor[Log[3, max/2^i]]}]]], And @@ PrimeQ[# + {-1, 1}] &], #] & /@ {2, 3}]; seq[10^250] (* Amiram Eldar, Aug 01 2025 *)
  • Python
    from math import log10
    from gmpy2 import is_prime
    l2, l3 = log10(2), log10(3)
    upto_digits = 200
    sum_limit = 2 + int((upto_digits - l3)/l2)
    def TP_pi_2_upto_sum(limit): # Search all partitions up to the given exponent sum.
        unsorted_result = [(2, log10(4)), (1, log10(6))]
        for exponent_sum in range(3, limit+1, 2):
            for i in range(1, exponent_sum):
                j = exponent_sum - i
                log_N = i*l2 + j*l3
                if log_N <= upto_digits:
                    N = 2**i * 3**j
                    if is_prime(N-1) and is_prime(N+1):
                         unsorted_result.append((i+j, log_N))
        sorted_result = sorted(unsorted_result, key=lambda x: x[1])
        return sorted_result
    print([s for s, _ in TP_pi_2_upto_sum(sum_limit) ])

A360844 a(n) is the least k-full number that is sandwiched between twin primes.

Original entry on oeis.org

4, 432, 2592, 139968, 139968, 174960000000, 56358560858112, 84537841287168, 578415690713088, 578415690713088, 1141260857376768, 61628086298345472, 61628086298345472, 61628086298345472, 322850407500000000000000000000, 322850407500000000000000000000, 62518864539857068333550694039552
Offset: 2

Views

Author

Amiram Eldar, Feb 23 2023

Keywords

Comments

k-full number is a number m such that if a prime p divides m then so does p^k. All the exponents in the canonical prime factorization of a k-full number are not smaller than k.
a(2)-a(15) are the terms below 3*10^19. Except for a(7) = 174960000000, they are all 3-smooth numbers (A003586, and thus they are terms of A027856). Are there other terms that are not 3-smooth?
a(168) = 2^176 * 3^173 * 7^168 is the first term that is not 5-smooth. - Bert Dobbelaere, Feb 24 2023

Examples

			The first 3 terms, their factorizations and the corresponding twin primes are:
  n |   a(n)  prime factorization  A051904(a(n))  {a(n)-1, a(n)+1}
  ----------------------------------------------------------------
  2 |     4                  2^2              2             {3, 5}
  3 |   432            2^4 * 3^3              3         {431, 433}
  4 |  2592            2^5 * 3^4              4       {2591, 2593}
		

Crossrefs

Extensions

More terms from Bert Dobbelaere, Feb 24 2023

A384835 The exponents (j, k) of the numbers 2^j*3^k that are averages of twin primes, with both j and k > 0, in the order of their sum, and then by j.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 3, 3, 2, 4, 3, 6, 1, 5, 4, 7, 2, 3, 10, 6, 7, 2, 15, 12, 5, 18, 1, 18, 5, 21, 4, 24, 5, 27, 4, 11, 24, 30, 7, 32, 9, 33, 8, 31, 12, 36, 7, 43, 2, 32, 15, 43, 8, 50, 9, 63, 2, 66, 25, 79, 20, 99, 10, 57, 64, 82, 63, 63, 88, 56, 99, 148, 27
Offset: 1

Views

Author

Ken Clements, Jun 10 2025

Keywords

Comments

These are the (j,k) exponents of the numbers 2^j*3^k that are averages of twin primes, ordered by j+k, j. They are remarkable in structure because except for the first pair (2^1*3^1), j+k is always an odd number. I have proof of this, and the reason it is not the case for the first pair is that 6-1=5 is the only number divisible by 5 that is prime.

Examples

			2^a(1) * 3^a(2) = 6.
2^a(3) * 3^a(4) = 18.
2^a(5) * 3^a(6) = 12.
2^a(7) * 3^a(8) = 108.
2^a(9) * 3^a(10) = 72.
		

Crossrefs

Cf. A027856, A384639 (ordered by value of 2^j*3^k).

Programs

  • Mathematica
    seq[max_] := Flatten@ Transpose[IntegerExponent[Select[Flatten[Table[2^j*3^(m-j), {m, 2, max}, {j, 1, m-1}]], And @@ PrimeQ[# + {-1, 1}] &], #] & /@ {2, 3}]; seq[200] (* Amiram Eldar, Jun 26 2025 *)
  • Python
    from sympy import isprime
    def is_TP_pi_2(j, k):
        N = 2**j * 3**k
        return isprime(N-1) and isprime(N+1)
    def aupto(limit):
        result = [1, 1]
        for exponent_sum in range(3, limit+1, 2):
            for j in range(1, exponent_sum):
                 k = exponent_sum - j
                 if is_TP_pi_2(j, k):
                      result.append(j)
                      result.append(k)
        return result
    print(aupto(10_000))
    
  • Python
    import heapq
    from gmpy2 import is_prime
    from itertools import islice
    def agen(): # generator of terms
        v, oldv, h = 1, 0, [(2, 1, 1, 6)]
        while True:
            s, e2, e3, v = heapq.heappop(h)
            if v != oldv:
                if is_prime(v-1) and is_prime(v+1):
                    yield from (e2, e3)
                oldv = v
                heapq.heappush(h, (s+1, e2+1, e3, 2*v))
                heapq.heappush(h, (s+1, e2, e3+1, 3*v))
    print(list(islice(agen(), 70))) # Michael S. Branicky, Jun 26 2025

A387060 Numbers k such that 16 * 3^k + 1 is prime.

Original entry on oeis.org

0, 3, 4, 5, 12, 24, 36, 77, 195, 296, 297, 533, 545, 644, 884, 932, 1409, 2061, 2453, 2985, 3381, 4980, 5393, 11733, 13631, 14516, 21004, 27663, 32645, 39453, 67055, 90543
Offset: 1

Views

Author

Ken Clements, Aug 15 2025

Keywords

Comments

a(33) > 10^5.
Conjecture: The only intersection with A385115 is at k = 3 where 2^4 * 3^3 = 432 = A027856(8).
Idea: For odd k > 3, covering systems ensure mutual exclusion:
If k = 1, 9, 13, 19, 25, 31, 37, 39, 43, 49, 55 (mod 60), then 7 or 31 divides (16*3^k+1).
If k = 5, 7, 11, 17, 23, 27, 29, 35, 41, 47, 53, 57, 59 (mod 60), then 11 or 13 divides (16*3^k-1).
If k = 15, 21, 33, 45, 51 (mod 60), various primes including {11,31,43,109,277,433,...} ensure at least one of 16*3^k +- 1 is composite.
If k = 3 (mod 60) and k > 3, the probability of intersection becomes vanishingly small.
Only k = 3 escapes all divisibility conditions. Verified to k = 10^5.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 4000], PrimeQ[16*3^# + 1] &] (* Amiram Eldar, Aug 16 2025 *)
  • Python
    from gmpy2 import is_prime
    print([k for k in range(4_000) if is_prime(16 * 3**k + 1)])
Previous Showing 11-20 of 24 results. Next