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

A385433 a(n) is the 2-adic valuation of A027856(n).

Original entry on oeis.org

2, 1, 2, 1, 3, 2, 6, 4, 7, 5, 6, 3, 18, 12, 2, 18, 21, 24, 27, 30, 33, 43, 32, 36, 11, 31, 43, 32, 50, 63, 66, 79, 99, 57, 82, 148, 63, 56, 211, 275, 287, 90, 148, 298, 160, 363, 134, 49, 529, 264, 960, 541, 988, 1015, 1440, 1295, 979, 258, 637, 2320, 1036, 2815, 1063, 180, 888
Offset: 1

Views

Author

Ken Clements, Jul 31 2025

Keywords

Comments

These are the exponents, i, of the prime factor 2 of the A027856 numbers m = 2^i * 3^j where m is the average of twin primes. After the second term, all sums of i+j are odd because even sums (where j>0) make either m-1 or m+1 divisible by 5, which precludes twin primes except for the case of 6, where m-1 is divisible by 5, but 5 is the only number divisible by 5 that is also prime.

Examples

			a(1) = 2 because A027856(1) = 4 = 2^2 * 3^0
a(2) = 1 because A027856(2) = 6 = 2^1 * 3^1
a(3) = 2 because A027856(3) = 12 = 2^2 * 3^1
a(4) = 1 because A027856(4) = 18 = 2^1 * 3^2
a(5) = 3 because A027856(5) = 72 = 2^3 * 3^2
		

Crossrefs

Programs

  • Mathematica
    seq[max_] := 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]; 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, log_N))
        sorted_result = sorted(unsorted_result, key=lambda x: x[1])
        return sorted_result
    print([i for i, _ in TP_pi_2_upto_sum(sum_limit) ])

A386730 a(n) is the 3-adic valuation of A027856(n).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 1, 3, 2, 4, 7, 10, 1, 5, 15, 5, 4, 5, 4, 7, 8, 2, 9, 7, 24, 12, 8, 15, 9, 2, 25, 20, 10, 64, 63, 27, 88, 99, 2, 16, 10, 169, 135, 51, 141, 52, 231, 320, 44, 419, 143, 476, 207, 332, 97, 324, 738, 1493, 1320, 333, 1167, 188, 1440, 2251, 2033
Offset: 1

Views

Author

Ken Clements, Jul 31 2025

Keywords

Comments

These are the exponents, j, of the prime factor 3 of the A027856 numbers m = 2^i * 3^j where m is the average of twin primes. Except for the first term, all are greater than zero because all other A027856 numbers have both 2 and 3 as prime factors. After the second term, all sums of i+j are odd because even sums make either m-1 or m+1 divisible by 5, which precludes twin primes except for the case of 6, where m-1 is divisible by 5, but 5 is the only number divisible by 5 that is also prime.

Examples

			a(1) = 0 because A027856(1) = 4 = 2^2 * 3^0
a(2) = 1 because A027856(2) = 6 = 2^1 * 3^1
a(3) = 1 because A027856(3) = 12 = 2^2 * 3^1
a(4) = 2 because A027856(4) = 18 = 2^1 * 3^2
a(5) = 2 because A027856(5) = 72 = 2^3 * 3^2
		

Crossrefs

Programs

  • Mathematica
    seq[max_] := 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}] &], 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 = [(0, 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((j, log_N))
        sorted_result = sorted(unsorted_result, key=lambda x: x[1])
        return sorted_result
    print([j for j, _ in TP_pi_2_upto_sum(sum_limit) ])

A059961 Duplicate of A027856.

Original entry on oeis.org

4, 6, 12, 18, 72, 108, 192, 432, 1152, 2592, 139968, 472392, 786432, 995328, 57395628, 63700992, 169869312, 4076863488, 10871635968, 2348273369088, 56358560858112, 79164837199872, 84537841287168, 150289495621632
Offset: 1

Views

Author

Keywords

A059960 Smaller term of a pair of twin primes such that prime factors of their average are only 2 and 3.

Original entry on oeis.org

5, 11, 17, 71, 107, 191, 431, 1151, 2591, 139967, 472391, 786431, 995327, 57395627, 63700991, 169869311, 4076863487, 10871635967, 2348273369087, 56358560858111, 79164837199871, 84537841287167, 150289495621631, 578415690713087, 1141260857376767
Offset: 1

Views

Author

Labos Elemer, Mar 02 2001

Keywords

Comments

Lesser of twin primes p such that p+1 = (2^u)*(3^w), u,w >= 1.
Primes p(k) such that the number of distinct prime divisors of all composite numbers between p(k) and p(k+1) is 2. - Amarnath Murthy, Sep 26 2002

Examples

			a(11)+1 = 2*2*2*3*3*3*3*3*3*3*3*3*3 = 472392.
		

Crossrefs

Programs

  • Mathematica
    nn=10^15; Sort[Reap[Do[n=2^i 3^j; If[n<=nn && PrimeQ[n-1] && PrimeQ[n+1], Sow[n-1]], {i, Log[2, nn]}, {j, Log[3, nn]}]][[2, 1]]]
    Select[Select[Partition[Prime[Range[38*10^5]],2,1],#[[2]]-#[[1]]==2&][[All,1]],FactorInteger[#+1][[All,1]]=={2,3}&] (* The program generates the first 15 terms of the sequence. *)
    seq[max_] := Select[Sort[Flatten[Table[2^i*3^j - 1, {i, 1, Floor[Log2[max]]}, {j, 1, Floor[Log[3, max/2^i]]}]]], And @@ PrimeQ[# + {0, 2}] &]; seq[2*10^15] (* Amiram Eldar, Aug 27 2024 *)

Formula

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

A060212 Primes q such that 6*q-1 and 6*q+1 are twin primes. Proper subset of A002822.

Original entry on oeis.org

2, 3, 5, 7, 17, 23, 47, 103, 107, 137, 283, 313, 347, 373, 397, 443, 467, 577, 593, 653, 773, 787, 907, 1033, 1117, 1423, 1433, 1613, 1823, 2027, 2063, 2137, 2153, 2203, 2287, 2293, 2333, 2347, 2677, 2903, 3257, 3307, 3407, 3413, 3593, 3623, 3673, 3923
Offset: 1

Views

Author

Labos Elemer, Mar 20 2001

Keywords

Comments

Primes in A182521. Also all primes p for which A182481(p)=1. - Vladimir Shevelev, May 03 2012
Conjecture: a(n) ~ n*log(n)*log(n*log(n))*log(log(n)). - Carl R. White, Nov 16 2023

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p=Prime[n]; If[PrimeQ[6*p-1] && PrimeQ[6*p+1], AppendTo[lst,p]], {n,100}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 16 2009 *)
  • PARI
    forprime(p=2, 9999, if(isprime(6*p+1) & isprime(6*p-1), print(p))) \\ David Radcliffe, Apr 02 2016
    
  • Python
    from sympy import *; print([p for p in primerange(2,9999) if isprime(6*p-1) and isprime(6*p+1)]) # David Radcliffe, Apr 02 2016

A060213 Lesser of twin primes whose average is 6 times a prime.

Original entry on oeis.org

11, 17, 29, 41, 101, 137, 281, 617, 641, 821, 1697, 1877, 2081, 2237, 2381, 2657, 2801, 3461, 3557, 3917, 4637, 4721, 5441, 6197, 6701, 8537, 8597, 9677, 10937, 12161, 12377, 12821, 12917, 13217, 13721, 13757, 13997, 14081, 16061, 17417
Offset: 1

Views

Author

Labos Elemer, Mar 20 2001

Keywords

Comments

Lowest factor-density among all positive consecutive integer triples; for p > 41, last digit of p can be only 1 or 7 (see Alexandrov link, p. 15). - Lubomir Alexandrov, Nov 25 2001

Examples

			102197 is here because 102198 = 17033*6 and 17033 is prime.
		

Crossrefs

Programs

  • Maple
    map(t -> 6*t-1, select(p -> isprime(p) and isprime(6*p-1) and isprime(6*p+1), [2,seq(i,i=3..10000,2)]));
  • Mathematica
    Transpose[Select[Partition[Prime[Range[2500]],2,1],#[[2]]-#[[1]] == 2 && PrimeQ[Mean[#]/6]&]][[1]] (* Harvey P. Dale, May 04 2014 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+2) && !((n+1) % 6) && isprime((n+1)/6); \\ Michel Marcus, Dec 14 2013

Formula

a(n) = 6 * A060212(n) - 1. - Sean A. Irvine, Oct 31 2022

Extensions

Offset changed to 1 by Michel Marcus, Dec 14 2013

A384530 Intersection of A055932 and A014574.

Original entry on oeis.org

4, 6, 12, 18, 30, 60, 72, 108, 150, 180, 192, 240, 270, 420, 432, 600, 810, 1050, 1152, 1620, 2310, 2592, 3000, 3360, 4050, 4800, 5880, 6300, 7350, 7560, 8820, 9000, 9240, 9720, 10500, 11550, 15360, 21600, 23040, 25410, 26250, 26880, 28350, 29400, 30870, 33600
Offset: 1

Views

Author

Ken Clements, Jun 01 2025

Keywords

Comments

Numbers that have a complete set of prime factors from 2 to their greatest prime factor (A055932) that are bracketed by twin primes (in A014574).
The density of twin prime numbers around terms appears to be enhanced, since the blocks of prime factors of a(n) "sweep" out possible low prime factors from a(n)-1 and a(n)+1.

Examples

			4 is a term since 4 = prime(1)# * 2 is in A055932 and 4-1 = 3 and 4+1 = 5 are both prime.
6 is a term since 6 = prime(2)# is in A055932 and 6-1 = 5 and 6+1 = 7 are both prime.
30 is a term since 30 = prime(3)# is in A055932 and 30-1 = 29 and 30+1 = 31 are both prime.
420 is a term since 420 = prime(4)# * 2 is in A055932 and 420-1 = 419 and 420+1 = 421 are both prime.
		

Crossrefs

Supersequence of A027856.

Programs

  • Maple
    q:= n-> andmap(isprime, [n-1, n+1]) and (s-> nops(s)=
            numtheory[pi](max(s)))({ifactors(n)[2][.., 1][]}):
    select(q, [$1..40000])[];  # Alois P. Heinz, Jun 01 2025
  • Python
    from sympy import factorint, prime, isprime
    def is_pi_complete(n):  # n is a term of A055932
        if n <= 1:
            return False
        factors = factorint(n)
        primes = list(factors.keys())
        max_prime, r = max(primes), len(primes)
        return max_prime == prime(r)
    def is_twin_prime_bracketed(n):  # n is a term of A014574
        return isprime(n-1) and isprime(n+1)
    def aupto(limit):
        return [n for n in range(4, limit+1, 2) if is_twin_prime_bracketed(n) and is_pi_complete(n)]
    print(aupto(40_000))

A060210 Largest prime factor of 1+smaller term of twin primes.

Original entry on oeis.org

2, 3, 3, 3, 5, 7, 5, 3, 17, 3, 23, 5, 5, 3, 11, 19, 5, 5, 47, 13, 29, 7, 3, 11, 29, 19, 5, 103, 107, 11, 5, 137, 23, 13, 7, 17, 43, 7, 59, 13, 3, 41, 71, 43, 31, 11, 17, 11, 19, 31, 67, 5, 139, 283, 41, 149, 13, 313, 23, 13, 37, 13, 347, 29, 11, 71, 17, 373, 7, 11, 13, 397, 17
Offset: 1

Views

Author

Labos Elemer, Mar 20 2001

Keywords

Comments

Also: Largest prime factor of the average, or the sum, of twin prime pairs. - M. F. Hasler, Jan 03 2011

Examples

			101 is the 9th lesser twin, 102 = 2*3*17, and its max p factor is 17=a(9).
		

Crossrefs

Programs

  • Mathematica
    FactorInteger[1+#][[-1,1]]&/@Select[Partition[Prime[Range[500]],2,1], #[[2]]- #[[1]]==2&][[All,1]] (* Harvey P. Dale, Jan 16 2017 *)
  • PARI
    p=3; for(n=1,1e3, until(o+2==p,p=nextprime(2+o=p)); print1(vecmax(factor(p-1)[,1])","))  \\ M. F. Hasler, Jan 03 2011

A078883 Lesser member p of a twin prime pair such that p+1 is 3-smooth.

Original entry on oeis.org

3, 5, 11, 17, 71, 107, 191, 431, 1151, 2591, 139967, 472391, 786431, 995327, 57395627, 63700991, 169869311, 4076863487, 10871635967, 2348273369087, 56358560858111, 79164837199871, 84537841287167, 150289495621631, 578415690713087, 1141260857376767
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 11 2002

Keywords

Examples

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

Crossrefs

Apart from initial terms, same as A059960.

Programs

  • Mathematica
    seq[max_] := Select[Sort[Flatten[Table[2^i*3^j - 1, {i, 1, Floor[Log2[max]]}, {j, 0, Floor[Log[3, max/2^i]]}]]], And @@ PrimeQ[# + {0, 2}] &]; seq[2*10^15] (* Amiram Eldar, Aug 27 2024 *)

Formula

a(n) = A027856(n)-1 = A078884(n)-2.

A386252 Numbers m of the form 2^i * 3^j * 5^k such that i, j, k > 0 and m+1 and m-1 are both prime numbers.

Original entry on oeis.org

30, 60, 150, 180, 240, 270, 600, 810, 1620, 3000, 4050, 4800, 9000, 9720, 15360, 21600, 23040, 33750, 138240, 180000, 281250, 345600, 737280, 3456000, 6144000, 6561000, 10125000, 13668750, 15552000, 17496000, 20995200, 22118400, 24000000, 30000000, 54675000
Offset: 1

Views

Author

Ken Clements, Jul 16 2025

Keywords

Examples

			a(1) = 2^1 * 3^1 * 5^1 = 30 where 29 and 31 are prime numbers.
a(2) = 2^2 * 3^1 * 5^1 = 60 where 59 and 61 are prime numbers.
a(3) = 2^1 * 3^1 * 5^2 = 150 where 149 and 151 are prime numbers.
a(4) = 2^2 * 3^2 * 5^1 = 180 where 179 and 181 are prime numbers.
		

Crossrefs

Subsequence of A143207.

Programs

  • Mathematica
    seq[max_] := 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}] &]; seq[10^8] (* Amiram Eldar, Jul 17 2025 *)
  • Python
    from math import log10
    from gmpy2 import is_prime
    l2, l3, l5 = log10(2), log10(3), log10(5)
    upto_digits = 20
    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((N, log_N))
        sorted_result = sorted(unsorted_result, key=lambda x: x[1])
        return sorted_result
    print([n for n, _ in TP_pi_3_upto_sum(sum_limit) ])
Showing 1-10 of 24 results. Next