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.

A376109 a(n) is the length of the longest arithmetic progression ending at n consisting of numbers with the same number of prime factors as n, counted with multiplicity.

This page as a plain text file.
%I A376109 #12 Sep 11 2024 00:42:39
%S A376109 1,1,2,1,2,2,3,1,2,2,3,2,2,3,2,1,3,2,3,2,3,3,4,2,2,3,2,3,5,2,3,1,3,3,
%T A376109 3,2,2,3,2,2,4,3,4,3,2,4,3,2,3,2,3,3,5,2,4,3,3,5,4,2,3,3,3,1,3,3,3,3,
%U A376109 4,3,3,2,3,3,2,3,3,3,4,2,2,4,4,3,3,4,5,3,3,2,4,4,4,3,3,2,4,3,3
%N A376109 a(n) is the length of the longest arithmetic progression ending at n consisting of numbers with the same number of prime factors as n, counted with multiplicity.
%C A376109 a(n) is the greatest k such that there exists d >= 1 with A001222(n-i*d) = A001222(n) for 0 <= i < k.
%C A376109 If m divides n, then a(n) >= a(m).
%C A376109 a(n) = 1 if and only if n is a power of 2.
%H A376109 Robert Israel, <a href="/A376109/b376109.txt">Table of n, a(n) for n = 1..10000</a>
%e A376109 a(7) = 3 because 7 is prime and there is an arithmetic progression of 3 primes, namely 3, 5, 7, ending with 7 but no such arithmetic progression of 4 primes.
%p A376109 M:= Array(1..10):
%p A376109 for n from 2 to 100 do
%p A376109   v:= numtheory:-bigomega(n);
%p A376109   if M[v] = 0 then M[v]:= n else M[v]:= M[v],n fi;
%p A376109 od:
%p A376109 for i from 1 to 10 do M[i]:= [M[i]] od:
%p A376109 f:= proc(s) local n,i,m,d,v,j;
%p A376109    m:= 1;
%p A376109    v:= numtheory:-bigomega(s);
%p A376109    member(s,M[v],n);
%p A376109    for i from n-1 to 1 by -1 do
%p A376109      d:= s - M[v][i];
%p A376109      if s - m*d < M[v][1] then return m fi;
%p A376109      for j from 2 while ListTools:-BinarySearch(M[v],s-j*d) <> 0 do od:
%p A376109      m:= max(m,j);
%p A376109    od;
%p A376109   m;
%p A376109 end proc:
%p A376109 f(1):= 1:
%p A376109 map(f, [$1..100]);
%Y A376109 Cf. A001222, A005115, A096003, A373887, A373888.
%K A376109 nonn
%O A376109 1,3
%A A376109 _Robert Israel_, Sep 10 2024