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.

A347338 a(n) is the smallest number k such that tau(k) = tau(k+n), and there is no number m, k < m < k+n such that tau(m) = tau(k).

This page as a plain text file.
%I A347338 #25 Apr 13 2025 01:46:53
%S A347338 2,3,35,7,4,12,39,20,146,30,52,32,175,88,693,9,99,108,188,847,1014,
%T A347338 392,124,25,315,234,195,416,196,477,225,48,2262,1327,1330,252,368,160,
%U A347338 1636,640,5067,168,441,884,1183,1064,1377,120,1328,112,4908,3872,891,396,512
%N A347338 a(n) is the smallest number k such that tau(k) = tau(k+n), and there is no number m, k < m < k+n such that tau(m) = tau(k).
%C A347338 The prohibition in the definition distinguishes this sequence from A065559. This sequence identifies the first occurrence of a gap between numbers with the same tau, where no intervening number has that tau. Each tau t > 1 has a corresponding sequence of gaps (e.g., for t = 2, A001223, for t = 3, A069482), and a(n) is the smallest index of terms in A000005 corresponding to the first occurrence of a gap of length n in all of these (same tau) gap sequences.
%C A347338 A number appearing in this sequence cannot appear again, and many numbers do not appear at all (1 is not in because it is the only number with 1 divisor; 5 6 and 8 are not in because 3 is already a term; 10 is not in because 7 is a term, etc.).
%H A347338 David A. Corneth, <a href="/A347338/b347338.txt">Table of n, a(n) for n = 1..10000</a>
%e A347338 a(1) = 2 because 2 is the smallest k such that tau(k) = tau(k+1); a(2) = 3 because it is the smallest k with tau(k) = tau(k+2) with no intervening same tau number; a(3) = 35 because d(35) = 4, d(36) = 9, d(37) = 2, d(38) = 4 = d(35) and this is the least case of a gap of 3. (Here d means tau, namely, A000005.)
%t A347338 Block[{a = {}, k, d = DivisorSigma[0, Range[2^14]]}, Do[k = 1; While[Or[#[[1]] != #[[-1]], Count[#, #[[1]]] > 2] &@ d[[k ;; k + n]], k++]; AppendTo[a, k], {n, 55}]; a] (* _Michael De Vlieger_, Aug 27 2021 *)
%o A347338 (PARI) a(n) = {my(i); for(i = 1, oo, if(iscan(i, n), return(i) ) ) }
%o A347338 iscan(k, n) = { my(c); c = numdiv(k); if(numdiv(k + n) != c, return(0) ); for(i = 1, n-1, if(numdiv(k + i) == c, return(0) ) ); 1 } \\ _David A. Corneth_, Aug 27 2021
%o A347338 (Python)
%o A347338 from sympy import divisor_count
%o A347338 from functools import lru_cache
%o A347338 @lru_cache(maxsize=None)
%o A347338 def tau(n): return divisor_count(n)
%o A347338 def a(n):
%o A347338     k = 2
%o A347338     while True:
%o A347338         while tau(k) != tau(k+n): k += 1
%o A347338         if not any(tau(m) == tau(k) for m in range(k+1, k+n)): return k
%o A347338         k += 1
%o A347338 print([a(n) for n in range(1, 56)]) # _Michael S. Branicky_, Aug 27 2021
%Y A347338 Cf: A000005, A001223, A005237, A069482, A276963, A005179, A065559.
%K A347338 nonn
%O A347338 1,1
%A A347338 _David James Sycamore_, Aug 27 2021