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.

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

This page as a plain text file.
%I A385433 #21 Aug 04 2025 01:12:04
%S A385433 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,
%T A385433 32,50,63,66,79,99,57,82,148,63,56,211,275,287,90,148,298,160,363,134,
%U A385433 49,529,264,960,541,988,1015,1440,1295,979,258,637,2320,1036,2815,1063,180,888
%N A385433 a(n) is the 2-adic valuation of A027856(n).
%C A385433 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.
%H A385433 Ken Clements, <a href="/A385433/b385433.txt">Table of n, a(n) for n = 1..82</a>
%e A385433 a(1) = 2 because A027856(1) = 4 = 2^2 * 3^0
%e A385433 a(2) = 1 because A027856(2) = 6 = 2^1 * 3^1
%e A385433 a(3) = 2 because A027856(3) = 12 = 2^2 * 3^1
%e A385433 a(4) = 1 because A027856(4) = 18 = 2^1 * 3^2
%e A385433 a(5) = 3 because A027856(5) = 72 = 2^3 * 3^2
%t A385433 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 *)
%o A385433 (Python)
%o A385433 from math import log10
%o A385433 from gmpy2 import is_prime
%o A385433 l2, l3 = log10(2), log10(3)
%o A385433 upto_digits = 200
%o A385433 sum_limit = 2 + int((upto_digits - l3)/l2)
%o A385433 def TP_pi_2_upto_sum(limit): # Search all partitions up to the given exponent sum.
%o A385433     unsorted_result = [(2, log10(4)), (1, log10(6))]
%o A385433     for exponent_sum in range(3, limit+1, 2):
%o A385433         for i in range(1, exponent_sum):
%o A385433             j = exponent_sum - i
%o A385433             log_N = i*l2 + j*l3
%o A385433             if log_N <= upto_digits:
%o A385433                 N = 2**i * 3**j
%o A385433                 if is_prime(N-1) and is_prime(N+1):
%o A385433                      unsorted_result.append((i, log_N))
%o A385433     sorted_result = sorted(unsorted_result, key=lambda x: x[1])
%o A385433     return sorted_result
%o A385433 print([i for i, _ in TP_pi_2_upto_sum(sum_limit) ])
%Y A385433 Cf. A027856, A386730, A386731.
%K A385433 nonn
%O A385433 1,1
%A A385433 _Ken Clements_, Jul 31 2025