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.
%I A386498 #13 Jul 31 2025 18:32:55 %S A386498 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, %T A386498 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, %U A386498 14,10,6,7,5,2,4,2,29,26,5,15,4,2,26,15,13,17,16 %N A386498 a(n) is the 2-adic valuation of A386252(n). %H A386498 Ken Clements, <a href="/A386498/b386498.txt">Table of n, a(n) for n = 1..4000</a> %F A386498 a(n) = A007814(A386252(n)). %e A386498 a(1) = 1 because A386252(1) = 2^1 * 3^1 * 5^1 %e A386498 a(2) = 2 because A386252(2) = 2^2 * 3^1 * 5^1 %e A386498 a(3) = 1 because A386252(3) = 2^1 * 3^1 * 5^2 %e A386498 a(4) = 2 because A386252(4) = 2^2 * 3^2 * 5^1 %t A386498 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 *) %o A386498 (Python) %o A386498 from math import log10 %o A386498 from gmpy2 import is_prime %o A386498 l2, l3, l5 = log10(2), log10(3), log10(5) %o A386498 upto_digits = 100 %o A386498 sum_limit = 3 + int((upto_digits - l3 - l5)/l2) %o A386498 def TP_pi_3_upto_sum(limit): # Search all partitions up to the given exponent sum. %o A386498 unsorted_result = [] %o A386498 for exponent_sum in range(3, limit+1): %o A386498 for i in range(1, exponent_sum -1): %o A386498 for j in range(1, exponent_sum - i): %o A386498 k = exponent_sum - i - j %o A386498 log_N = i*l2 + j*l3 + k*l5 %o A386498 if log_N <= upto_digits: %o A386498 N = 2**i * 3**j * 5**k %o A386498 if is_prime(N-1) and is_prime(N+1): %o A386498 unsorted_result.append((i, log_N)) %o A386498 sorted_result = sorted(unsorted_result, key=lambda x: x[1]) %o A386498 return sorted_result %o A386498 print([i for i, _ in TP_pi_3_upto_sum(sum_limit) ]) %Y A386498 Cf. A007814, A386252, A386499, A386500, A027856, A384530, A080185. %K A386498 nonn %O A386498 1,2 %A A386498 _Ken Clements_, Jul 23 2025