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.

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

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